Variables in objects

How come I never knew the following?
I’ve got a lot on fun ahead of me.

var myObject = {
firstname: “Patrick”,
lastname: “Wall”
getlastname: function(){return this.lastname;}
}
trace(myObject.firstname);
trace(myObject.getlastname());

Class in classes

In an attempt to learn classes and ratchet up my knowledge to the next level of useage I’m going to add some entries to my blog as I learn. So that I can chart my progress.

By declaring a GenericObject an external actionscript class of the same name is automatically called when the movie plays. For instance:

var myGenericObject:GenericObject=new GenericObject();
trace (myGenericObject);

will trace [object Object] from .as file with the name of GenericObject.as.

For instance:
class GenericObject{

}

The player automatically looks for it in the root directory and hey presto – you have created a class!

getURL – Trash the target!

How many times must I try my _self targeted Flash links in IE only to discover that they open in new browser windows rather than into _self.

The following:
getURL(“http://www.google.com”, “_self”);
…doesn’t work in IE.

For future referrence – trash the target!

The following:
getURL(“http://www.google.com”);
…works!!