I see a spelling mistake in my original question, I meant "kill all the handlers within a particular movieclip", i.e. each content movieclip.
The number of and names of the onRelease handlers changes in each content movieclip, so rather than writing some hugely complex list of onRelease etc names and deleting them by name (as you have suggested), I wondered if there is any way to kill off all button handlers within a particular movieclip? On 05/06/07, Merrill, Jason <[EMAIL PROTECTED]> wrote:
Not knowing the specific handler names, seems you can just delete the references for the button events this way: delete myButton.onRelease delete myButton.onReleaseOutside delete myButton.onRollOver etc? Jason Merrill Bank of America GT&O Learning & Leadership Development eTools & Multimedia Team >>-----Original Message----- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf >>Of Andrew Doherty >>Sent: Tuesday, June 05, 2007 7:26 AM >>To: flashcoders@chattyfig.figleaf.com >>Subject: [Flashcoders] AS2: A nifty Event Handler Tidy-up? >> >>Is there any way to delete all event handlers within a >>particular movieclip? >> >>I've basically been working on a project developing an >>elearning engine that handles pages of external content >>loaded in as swf's. >> >>Now the person who has written the content swf's has a linked >>a class to each button within the content that has an >>onRollOver, onRelease etc handler. >> >>These content swf's are making the whole application run very >>slowly. I'm inclined to think it's either that flash has to >>process a class for every button on screen or that loads of >>onRelease etc handlers are being created and never cleaned up >>afterwards. >> >>As the content is loaded into a particular movieclip within >>the engine, does anyone know a way to kill all the handlers >>with a particular movie, probably without knowing the handler >>name? The app is written in AS". >> >>Cheers >>Andrew >>_______________________________________________ >>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