[Flashcoders] Q:register a movieclip with a class dynamically

2006-10-30 Thread bitstreams
Hi I have a pretty basic question concerning registering Movieclips that are created dynamically. //CODE START import com.mydomain.util.MyClass; var holder=this.createEmptyMovieClip(_mcRef+_xPos,this.getNextHighestDepth()); //CODE END How do I register 'holder' with MyClass? Thanks in advance

Re: [Flashcoders] Q:register a movieclip with a class dynamically

2006-10-30 Thread John Axel Eriksson
It is possible but I don't know if it is supported by Adobe... You can do this: dynamic class TestClass{ public static var __symbolName:String = __Packages.TestClass; public static var __symbolLinked:Boolean = Object.registerClass (__symbolName, TestClass); public static function create

Re: [Flashcoders] Q:register a movieclip with a class dynamically

2006-10-30 Thread Michael Bedar
I forget who posted this originally, but here's how to create a class that extends MovieClip without a symbol in the library. Then you can use attachMovie to create an instance. class net.something.MyButton extends MovieClip { public static var symbolName:String