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 + :) 2006/6/29, Scott Hyndman <[EMAIL PROTECTED]>:
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 really interested, you could look at the code. Here's a link: http://tinyurl.com/jqtwv It's a gigantic class...so it might be difficult to work through. The important method is createMovieClips(), which is called when a view (the type of object that encapsulates movieclips) moves to a new superview. Scott On 29/06/06, Jim Kremens <[EMAIL PROTECTED]> wrote: > "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 you mean, or am I missing the point? Can you give a small code > example? > > Thanks, > > Jim Kremens > _______________________________________________ > 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 > _______________________________________________ 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
_______________________________________________ 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