remove listeners - for loop

Historically, I have been removing listeners on exitScene, listener by listener. This works perfectly but begs the question, is there a way to detect all active listeners to loop through and removeEventListener en masse? Seems easier to manage with a simple for loop.

what listeners are you trying to remove?

basic listeners like:

Runtime:addEventListener(“enterFrame”, spawnTable[i])

Runtime:addEventListener(“touch”,touchScreen)

burst.enterFrame = rotate

Runtime:addEventListener(“enterFrame”, burst)

It would be interesting to detect all of the active listeners and remove them on exitScene. 

I don’t know of a way.

what listeners are you trying to remove?

basic listeners like:

Runtime:addEventListener(“enterFrame”, spawnTable[i])

Runtime:addEventListener(“touch”,touchScreen)

burst.enterFrame = rotate

Runtime:addEventListener(“enterFrame”, burst)

It would be interesting to detect all of the active listeners and remove them on exitScene. 

I don’t know of a way.