Sadly - override is AS3 only ... not AS2... -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: 01 May 2008 15:26 To: Flash Coders List Subject: RE: [Flashcoders] How do I remove methods of superclass in AS2?
Override the functions instead with the override keyword. Something like this: override public function onPress(e:Event):void { } Jason Merrill Bank of America Global Technology & Operations L&LD eTools & Multimedia Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and technologies? Check out our internal GT&O Innovative Learning Blog & subscribe. >>-----Original Message----- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf >>Of Alistair Colling >>Sent: Thursday, May 01, 2008 7:21 AM >>To: Flash Coders List >>Subject: [Flashcoders] How do I remove methods of superclass in AS2? >> >>Hiya, thanks for checking this. I have a custom class that I >>am using as kind of button. The thing is I now want to remove >>the onPress and onRelease methods as there is a nested >>movieclip I want to attach these events to. >> >>What I would like to know is can I remove or nullify the >>methods of a superclass from the subclass? >> >>Any help very much appreciated, an outline of my code is below. >> >>Thanks :) >> >>Ali >> >> // superclass >>class Classes.AnswerBut extends MovieClip{ >> >> function AnswerBut(){ >> trace("AnswerBut created"); >> } >> >> public function onPress(){ >> //actions here >> } >> >> public function onRelease(){ >> //actions here >> } >>} >> >> //subclass >>class Classes.NoAnswerBut extends Classes.AnswerBut{ >> >> function NoAnswerBut(){ >> trace("NoAnswerBut created"); >> } >> >> // I want to remove the onPress / onRelease >>events in the class definition here } >>_______________________________________________ >>Flashcoders mailing list >>Flashcoders@chattyfig.figleaf.com >>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- No virus found in this incoming message. Checked by AVG. Version: 7.5.524 / Virus Database: 269.23.7/1408 - Release Date: 30/04/2008 18:10 _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders