Remove/Restart Ticker
Hello,
I am creating a canvas animation that I want to restart. I am using the ticker and have tried numerous was to remove/restart it, but it continues to increment no matter what I do.
Here is how I initialize it:
createjs.Ticker.addEventListener("tick", handleTick);
createjs.Ticker.setFPS(24);
console.log(createjs.Ticker.getTicks());
in my restart function, I do this, but have tried numerous ways:
createjs.Ticker.removeAllEventListeners();
createjs.Ticker.addEventListener("tick", handleTick);
console.log(createjs.Ticker.getTicks()); //When I output this, it just picks up where it left off even though I remove it.
Please note that I do not want to pause it. I would like it to start again from 0 when I restart.
As always, any insight is much appreciated!
