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
_______________________________________________
Flashcoders@chattyfig.figleaf.com
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

Reply via email to