In AS2 I could use eval(), in php i could use varvar ($$foo), but can't figure out how to achieve this in AS3.
I have a handful of custom components in a parent component (let's call it parentComp for this example). I want to be able to reference them programmatically like this:
in this example above, I hope to reference the custom component named 'foo' inside the 'parentComp' parent component.
i've tried a bunch of different syntaxes like parentComp.someDynamicName.doSomething();,etc...
i also read about creating an object that holds all the custom components like,
but then compHolder['obj1'].doSomething(); doesn't affect the custom component 'foo' at all.
Any help would be much appreciated, thank you.
Which is the old AS2 way..