I am adding event listeners dynamically (dynamic objects added to the runtime table, when i’m done with the objects how am I able to remove these listeners? i find that after a while the app slows down tremendously, i’ve assigned nil to the objects so i’m assuming that it’s the tables getting too large. thanks
I would normally define and pass it into the addEventListener so I could pass same function in to remove, but since I have to define dynamic objects passed into the table on the fly, can’t predefine the function.
function rotateObj()
–something something something
end
Code i’m actually using.
Runtime:addEventListener(“enterFrame”, function() rotateObj(newDino, 0); end);
Can I do
Runtime:removeEventListener(“enterFrame”, function() rotateObj(newDino,0); end);
would this work? [import]uid: 6317 topic_id: 1093 reply_id: 301093[/import]