This is just because "group_mc.node_mc" is not a property of "this",
only the "group_mc" bit is. What you would need to do is
this["group_mc"]["node_mc"] , however you want to store those in your array.
Or, you can use eval, as
testValue = eval(targetArray[0]).id;
should do what you want, and it is not deprecated in AS2.
Regards,
Grant Cox
Dave Geurts wrote:
Okay,
So I swear I have done this 1oo times before but for the life of me I
cannot get this to work.
So lets say I have a MC called group_mc that contains a MC called
node_mc and node_mc contains a variable named id.
When I do:
trace("test:"+this.group_mc.node_mc.id);
I get the value I expect but when I do the following I get nothing
_global.targetArray = new Array();
_global.targetArray[0] = "group_mc.node_mc";
testValue = this[targetArray[0]].id;
trace("test:"+testValue);
I get nothing??
I am compiling with flash 7 AS 2.0
THANKS in advanced
Dave Geurts
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders