Skip to main content
tulzb79303325
Participant
July 31, 2020
Answered

Loop timeline twice, then stop on a certain frame before end

  • July 31, 2020
  • 2 replies
  • 713 views

Hi, I'm trying to loop the entire timeline twice, but then stop before the end frame on the second loop, is this possible? 

I'm current using this snippet:


if (!this.looped) this.looped = 1;

if (this.looped++ == 2) this.stop();

 

Thanks for your help

This topic has been closed for replies.
Correct answer kglad

assuming this is on the frame where you want the timeline to stop:

 

if (!this.looped) {

this.looped = 1;

} else {

this.looped++;

}

if(this.looped == 2){

this.stop();

}

2 replies

Legend
August 1, 2020

So put that code where you want it to stop. What's the problem?

tulzb79303325
Participant
August 3, 2020

Thanks both – it's always the simplest answer.

 

kglad
Community Expert
Community Expert
August 3, 2020

you're welcome.

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
August 1, 2020

assuming this is on the frame where you want the timeline to stop:

 

if (!this.looped) {

this.looped = 1;

} else {

this.looped++;

}

if(this.looped == 2){

this.stop();

}