Skip to main content
Participant
June 9, 2016
Question

Loop Animate CC timeline X times and stop

  • June 9, 2016
  • 1 reply
  • 30863 views

I'm trying to loop the timeline a few times and stop. All the help files I have found so far do not work. Anyone have any ideas?

This topic has been closed for replies.

1 reply

Inspiring
June 9, 2016

Another time, try to search forum

Put this code on last frame. This is sample for 3 loops.

if(!this.alreadyExecuted){

this.alreadyExecuted=true;

this.loopNum=1;

} else {

this.loopNum++;

if(this.loopNum==3){

this.stop();

}

}

Legend
June 9, 2016

You can do it in a lot less code than that:

  1. if (!this.looped) this.looped = 1
  2. if (this.looped++ > 3) this.stop(); 

Put the code wherever you want it to stop, set the 3 to the desired loops.

Strange how often this specific simple question comes up.

Boerresen
Participating Frequently
November 17, 2022

Any pointers? 


I've been using these above codes in previous banners. Now neither of the codes are working. Aaargh! Stupid update.
Have anyone figured out what to do instead?..   I miss Flash.