Re: [Flashcoders] Programmatically instantiating a class that extends MovieClip.

2006-06-30 Thread eka
Hello :) it's easy, you must use __proto__ AS2 - MyClass extend MovieClip !!! MyClass extends MovieClip { // o Constructor public function MyClass() { } } var mc = createEmptyMovieClip(myInstance, 1) ; mc.__proto__ == MyClass.prototype ; MyClass.call(mc) ; EKA + :)

Re: [Flashcoders] Programmatically instantiating a class that extends MovieClip.

2006-06-29 Thread Ian Thomas
To the best of my knowledge, no, unfortunately. That's one of the reasons that I'm looking forward to AS3. :-) Ian On 6/29/06, Jason Lutes [EMAIL PROTECTED] wrote: Since this relates to some things that were brought up recently... Is it possible to have a class that extends MovieClip, but

Re: [Flashcoders] Programmatically instantiating a class that extends MovieClip.

2006-06-29 Thread Jim Kremens
Google 'Ted Patrick' and 'MCE'. You can't use 'new' but it's a lot better and you don't need a library symbol. I've been using a variant of it for about 18 months now with no trouble. Jim Kremens On 6/29/06, Ian Thomas [EMAIL PROTECTED] wrote: To the best of my knowledge, no,

Re: [Flashcoders] Programmatically instantiating a class that extends MovieClip.

2006-06-29 Thread Scott Hyndman
Why not subclass object instead? Both ActionStep and ASwing work this way, then create movieclips on the fly. It's very nice to work with. Scott On 29/06/06, Jim Kremens [EMAIL PROTECTED] wrote: Google 'Ted Patrick' and 'MCE'. You can't use 'new' but it's a lot better and you don't need a

Re: [Flashcoders] Programmatically instantiating a class that extends MovieClip.

2006-06-29 Thread Jim Kremens
Why not subclass object instead? Both ActionStep and ASwing work this way, then create movieclips on the fly. It's very nice to work with. So you never really subclass movieclip, you use composition instead. In other words, your class has a movieclip, but it isn't a movieclip.,, Is that what

Re: [Flashcoders] Programmatically instantiating a class that extends MovieClip.

2006-06-29 Thread Scott Hyndman
That's exactly what I mean. As a result you can do cool things like reparenting -- like moving a button from one window to another. It handles the MovieClip creation itself. A code example really isn't too easy, because the framework that allows this to be possible is quite large. If you were