I know this is a simple question and probably a single line of code, but I cannot find it anywhere. Can anyone give me the code to remove a listener? I am removing the objects properly, but when the function is called again the previous listener is recreated and applies to my object multiple times. As a result, not removing the listener is ruining my animations and slowing down my App considerably. [import]uid: 4871 topic_id: 626 reply_id: 300626[/import]
this is the call removeEventListener (“listenername”, object )
objectX:removeEventListener(“foo”,object)
[import]uid: 24 topic_id: 626 reply_id: 1236[/import]
Your the best Carlos. Thank you for the help. [import]uid: 4871 topic_id: 626 reply_id: 1237[/import]
I couldn’t get this to work, my listeners still seem to be active, however, if you return true from all your event functions, this will only run the button pressed. [import]uid: 4523 topic_id: 626 reply_id: 1246[/import]