Short reminder: Event.REMOVE does bubble;
Event.REMOVE_FROM_STAGE does not.
So when implementing a listener don’t forget to check the target:
function onRemove(anEvent: Event) { if (anEvent.target == this) { // clean up } } |
Short reminder: Event.REMOVE does bubble;
Event.REMOVE_FROM_STAGE does not.
So when implementing a listener don’t forget to check the target:
function onRemove(anEvent: Event) { if (anEvent.target == this) { // clean up } } |