The problem is when you get an entire string (the target name), you just want to get to the reference in one shot (e.g. "mc1.mc2.mc3"). The collection method requires parsing before you can get to the reference. I was hoping Macromedia would provide at least a similar way to get to it when they retire eval in AS3.
- boon --- ryanm <[EMAIL PROTECTED]> wrote: > > With the eval being gone in AS3, does anyone know > how to get to the > > reference of a movieclip (via the target name > string) without using eval? > > I know we can instantiate the class via the > _global namespace but not > > positive about mc's. > > > > Using the object collection, like you should've > been doing since eval > was depreciated. > > parentclip["clipname"] > > Works for nested targets too: > > parentclip.subclip["clipname"] > or > parentclip["subclip"]["clipname"] > > Like this: > > trace(parentclip["subclip"]["clipname"]._x); > or > trace(_root["clip1"]["clip2"]["clip3"]["clip4"]._x) > > ryanm > > _______________________________________________ > [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 > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ [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

