Correct way to use TIcker

254 views
Skip to first unread message

Vladimir Li

unread,
Mar 8, 2015, 12:20:16 AM3/8/15
to createjs-...@googlegroups.com
I want to have some time panel on my canvas, which will be updated every second 
I can implement it like: 
createjs.Ticker.addEventListener("tick", handleTick);
createjs.Ticker.setInterval(1000);
function handleTick(event) {
   //update timer
};

than I want to make some animation once ( draw line for example ) 
what would be the correct way to do it without stopping my timer logic?

Lanny McNie

unread,
Mar 9, 2015, 4:50:07 PM3/9/15
to createjs-...@googlegroups.com
The Ticker acts like a setInterval (and is more consistent). Check out our drawing demo - the "CurveTo" example in GitHub (shown here: http://createjs.com/Demos/EaselJS/CurveTo) to see how it works.
Reply all
Reply to author
Forward
0 new messages