removing runtime listeners

Has anyone else ever had any difficulty removing listeners using director? I have a shake event which fires a function, and every time I reload the scene the function fires an additional time - that is, on the fourth reload of the scene, the function runs four times, though the shake listener has been invoked only once. I assume that this means that the listener has not been removed, but I have tried Runtime:removeEventListener in every spot I could think of, and now I’m at a loss. Thoughts? Thanks! [import]uid: 96383 topic_id: 19002 reply_id: 319002[/import]

Hi,

Did you solve this question?

I have the same problem. In my case is with “orientation” event that can be only added to runtime.

Thanks.

[import]uid: 117044 topic_id: 19002 reply_id: 79215[/import]

Never solved, only worked around- dropped a flag so the listener is only added once. Kind of ridiculous, now there’s a runtime listener floating around which never goes away, but it works :slight_smile: [import]uid: 96383 topic_id: 19002 reply_id: 79247[/import]

True!

I’ve been using this from stage to stage:

Runtime.\_functionListeners = nil  
//Launch new listener  

But i really dont now all the consequences…

Thanks… [import]uid: 117044 topic_id: 19002 reply_id: 79254[/import]