Hi,
In the past, using Flash CS3 when I needed to remove timers or event listeners from a swf that had been loaded into a parent swf I’d use this inside the loaded swf:
this.addEventListener(Event.REMOVED_FROM_STAGE, deactivate, false, 0, true);
function deactivate(e:Event):void
{
if (e !== null) { e.target.removeEventListener(e.type, deactivate); }
//an example of the sort of code I might use
stage.removeEventListener(Event.ENTER_FRAME, scrollThumbs);
trace("removed");
}
Now that I’ve upgraded to CS5 and am outputting to Flash Player 10 this no longer seems to work. The event fires right away. Does anyone know why this might be and if there’s an alternative that I can use?
I tried the unloadAndStop() method in the parent swf but I’m trying to remove some TweenMax delay timers and it doesn’t seem to be working.
Any advice would be greatly appreciated. Thank you.