In the beginning of my code, I set a tick event. These 3 following lines work.
createjs.Ticker.addEventListener("tick", handleTick);
createjs.Ticker.useRAF = true;
createjs.Ticker.setFPS(30);
I would like to remove the listener at the end of my code. I tried to call it like that but it doesn't work:
createjs.Ticker.removeAllListeners();
The Firefox console says me createjs.Ticker.removeAllListeners is not a function.
So i tried to switch to the other one:
createjs.Ticker.removeEventListener("tick", handleTick);
And It also doesn't work. I don't really know how to use it. On the official website they use it with a displayObject, but I don't create it link to a button or something else.
http://www.createjs.com/Docs/EaselJS/classes/Ticker.html#method_removeAllEventListeners
Could someone could help me to solve it please ?
Thanks
EDIT: I'm using the easelJS version 0.7.1 but I think my problem is linked to a tutorial using an older version of easelJS (0.5). Does anyone know how to adapt it the the latest version of easelJS ? thanks
EDIT 2: I found on this link (http://www.createjs.com/Docs/EaselJS/modules/EaselJS.html) the utilization of createjs.Ticker.addEventListener("tick", handleTick); in the latest version of easelJS, but there is no documentation about how to remove the listener called from createjs.Ticker, i'm still looking for a solution