Sounds like you are trying to extend an instance of a MovieClip, rather than
MovieClip itself. Naturally, you can extend a class that extends MovieClip,
but not an instance.


Are you really thinking of

instance.onRelease= function () {
// whatever
}

perhaps?
----- Original Message ----- 
From: "David Cohn" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, February 04, 2007 8:07 PM
Subject: [Flashcoders] extends MovieClip


> Hey all,
>
> Is it possible to use a "class extends MovieClip" on a pre-existing
> (authored) MovieClip?
> I'd like to seamlessly do something like:
>
> class blah extends MovieClip {
>
> public function blah() {
> this.onRelease = function() {
> // handle release here
> };
> };
> };
>
> ... but I can't see how to set this up (I'm using ActionScript 2.0,
> but is there a 3.0 only solution?).
>
> If not, what do people think is the most elegant way to handle this,
> e.g.:
>
> class blah {
>
> public function blah( caller:MovieClip ) {
> caller.onRelease = function() {
> (blah instance).handleRelease();
> };
> };
>
> public function handleRelease() {
> // handle release here
> };
> };
>
> ...I'd like to make this as seamless as possible for the graphic
> designers.
>
> Thanks,
> --Dave
>
> _______________________________________________
> [email protected]
> 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
>


_______________________________________________
[email protected]
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

Reply via email to