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