Re: [Flashcoders] eval gone in AS3, how to get reference to mc via target name?

2006-03-04 Thread ryanm
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

Re: [Flashcoders] eval gone in AS3, how to get reference to mc via target name?

2006-03-04 Thread Boon Chew
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

Re: [Flashcoders] eval gone in AS3, how to get reference to mc via target name?

2006-03-04 Thread ryanm
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

Re: [Flashcoders] eval gone in AS3, how to get reference to mc via target name?

2006-03-04 Thread Stan Vassilev
@chattyfig.figleaf.com Sent: Sunday, March 05, 2006 12:40 AM Subject: Re: [Flashcoders] eval gone in AS3,how to get reference to mc via target name? 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

Re: [Flashcoders] eval gone in AS3, how to get reference to mc via target name?

2006-03-04 Thread Michael Bedar
While I agree that eval still had a use or two, you can easily write the function yourself and just add it to your code Library.. almost as good On Mar 4, 2006, at 5:40 PM, Boon Chew wrote: The problem is when you get an entire string (the target name), you just want to get to the

Re: [Flashcoders] eval gone in AS3, how to get reference to mc via target name?

2006-03-03 Thread Darron J. Schall
Boon Chew 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. Use getChildByName( name):

Re: [Flashcoders] eval gone in AS3, how to get reference to mc via target name?

2006-03-03 Thread Darron J. Schall
Boon Chew wrote: Will getChildByName work with a nested target name (e.g. _level0.mc1.mc2.mc3)? No, it gets the child with the particular name in the display object container. You'll want to split the string apart: // Not tested - but you get the basic idea var parts:Array = name.split(

Re: [Flashcoders] eval()

2005-11-04 Thread Ian Thomas
_root[something+i].onRollOut=function() { } HTH, Ian On 11/4/05, Spiros Gerokostas [EMAIL PROTECTED] wrote: hi, can you help with this line of code? eval(_root.something + i + .onRollOut) = function() { } well i know this is wrong in flash 6. Is this possible? this[_root.something