Thanks Jason. I see what you're saying. So I inited an object and then
define it, but the below still errors. I was just hoping to be able to
define my object with only one line of code.
private function createData():Void {
this._data = new Object();
this._data["a"] = new Object();
this._data["a"] = {"t1":0, "t2":0};
}
I was using new Number for a reason, but it's not critical I suppose.
Thanks Steven.
- Mike
The second line does not work because you are evaluating a string to try
to resolve it to a property of the object, (which you are hoping is a
sub-object) that does not exist yet. In other words,
this._data.a
the .a in the above statement has not been declared or identified as an
object, and thus this._data["a"] resolves to nothing.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com