Do I need remove local event listeners when go to next scene?

Hi all,

do I need remove local event listeners when go to next scene? or in general when I have to remove local listeners? 

ldurniat

Touch and tap handlers on display objects should not need removed. They should be hidden by the scene transition (assuming you have a solid background). When the scene is destroyed the listeners will be removed with the objects.

However listeners that are attached to the global Runtime object should be removed if you don’t want them in the next scene. Now if you have “enterFrame” listeners on objects, you probably want to remove them since they will continue to run even though the scene has transitioned away.

Rob

This is what I need :) 

Thanks Rob.

Touch and tap handlers on display objects should not need removed. They should be hidden by the scene transition (assuming you have a solid background). When the scene is destroyed the listeners will be removed with the objects.

However listeners that are attached to the global Runtime object should be removed if you don’t want them in the next scene. Now if you have “enterFrame” listeners on objects, you probably want to remove them since they will continue to run even though the scene has transitioned away.

Rob

This is what I need :) 

Thanks Rob.