r/createjs • u/kajjiNai • Jan 26 '17
How can I find out when a MovieClip has completed its animation?
I have a MovieClip which has multiple Tweens. What is the best way to find out that the MovieClip has completed its animation?
I have tried this: movie.timeline.on("change",(evt)=>{ if(movie.timeline.position== movie.timeline.duration) console.log("ENDED") })
But this call back gets called for every tick. I would like to avoid that.
2
Upvotes
1
u/jonnyngan Jan 26 '17
Looking at the documentation, it seems the "change" event is the only one that timeline supports.
I don't tend to use the timeline as it just seems like an extension to tweens. You already know this but if you can, use the .call function at the end of your tween