Check following code ::
var obj1:Object = new Object();
obj1.prop1 = “Naresh”;
obj1.prop2 = “Khokhaneshiya”;
var obj2:Object = new Object();
obj2.prop2 = “Hello world”;
obj1 = obj2;
trace(obj1.prop1); //What will be output here
obj1.prop1 = “Khokhaneshiya”;
trace(obj1.prop1); //What will be output here
Be honest, Don’t trace it out using Flash.
You will have answer in following posts !
Posted by sawrub on September 8, 2009 at 1:34 pm
any idea why I get a Syntax error at obj1.prop1 = “Naresh”; itself?
Posted by Naresh Khokhaneshiya on September 8, 2009 at 1:37 pm
That is because you just copied and pasted code from post. You should write “Naresh” on your own because Flash does not know what is ” from this post.