Hi Everyone,
I’m trying to find out if there is a better way to solve this problem.
I’ve got an object module (class) that returns an instance of a display object. Within that module, an enterFrame event listener is added to Runtime with that new object as it’s reference.
So back in our game.lua, where our new objects are created, I want to move on to a new scene (when the game is over for example). Do I have to cycle through each reference to remove the Runtime event listener?
The reason I ask is because I’ve actually got a number of modules, and there could potentially be hundreds of objects, so therefore I would have to create a cycle for each object type.
Perhaps there’s a way to cycle through all the Runtime object’s event Listeners? and cancel the enterFrame ones?
Thanks in advance for your help guys.
Michael