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

2006-03-06 Thread Abdul Qabiz
eval was gone long back, I mean it was there but most of people stopped using, at least I did after Flash 5 was released. I could use [] or dot (.) to reference things...Much cleaner approach, though eval was little faster...But code clarity matters. Folks who were not using eval(..) would be

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

2006-03-05 Thread Tom Bray
I have a question that's almost related.In AS3, how can I instantiate a class, com.foo.MyClass, using the string com.foo.MyClass? The reason I ask is that I'd like to load an XML file and use it to dynamically create components at runtime. Something like this: components component

RE: [flexcoders] eval gone in AS3, how to get reference to movieclip via target name?

2006-03-05 Thread Matt Chotin
getClassByBame will return the Class, then you can use new on it. Make sure you have any class that youd want to instantiate linked in by having a typed variable for it though Matt From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Tom Bray

RE: [flexcoders] eval gone in AS3, how to get reference to movieclip via target name?

2006-03-04 Thread Boon Chew
I am not using Flex, I am mostly curious what I would have to do to my existing Flash actionscript code when AS3 is out for Flash.Gordon Smith [EMAIL PROTECTED] wrote:Whoa not only is there no eval(), there's no _target, no _level0, and no _global! Plus, you

[flexcoders] eval gone in AS3, how to get reference to movieclip via target name?

2006-03-03 Thread Boon Chew
Hi all,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 (e.g. "_level0.mc1.mc2.mc3") ? I know we can instantiate an object from a class name string via the _global namespace but not positive about

RE: [flexcoders] eval gone in AS3, how to get reference to movieclip via target name?

2006-03-03 Thread Gordon Smith
Whoa not only is there no eval(), there's no _target, no _level0, and no _global! Plus, you should almost always use Sprite instead of MovieClip. So what are you really trying to do? Are you using Flex or just pure AS3? Where are you getting a string like sprite1.sprite2.sprite3