Skip to main content
justfang
Participant
November 16, 2020
Question

Animate trouble, finishing an animation loop before going to the next.

  • November 16, 2020
  • 1 reply
  • 243 views

Hey, I am currently working on interactive comic book content in Animate CC. I stumble on a problem I cannot solve.

 

I make a lot of use of looping animation. I use Javascript (because I use HTML5 Canvas) to make those loops with a bit of code where at a certain frame number, the timeline automaticly goes back towards a certain frame number so it loops. The idea is that when the user clicks on a button, the animation goes into the next loop. Now here is my problem, because I want to make this transision as smooth as possible, I cannot seem to make it work so that the animation finish the previous loop before going into the next one. (because I use the fuction: go to certain frame and play() code).

 

I hope this make sence, I am also not really a code expert, but this is pretty much the only code in my project I need besides the basics.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
December 6, 2020

if you want to wait until the currently playing movieclip reaches a certain frame (eg, its last frame), start a code loop (eg, Ticker EaselJS v1.0.0 API Documentation : Ticker (createjs.com)) that repeatedly checks that movieclip's currentFrame and when currentFrame == totalFrames, then "go to the next movieclip".

 

note:  unless you show something to the user, they're going to think something is "broken" because when they click a button they won't see an immediate response.