Skip to main content
tulzb79303325
Participant
July 31, 2020
Answered

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

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 is closed to new replies. Start a new post to keep the conversation going.
kglad
kgladCorrect 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();

}

4 replies

Legend
August 1, 2020

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

Translate
tulzb79303325
Participant
August 3, 2020

Thanks both – it's always the simplest answer.

 

Translate
kglad
Community Expert
Community Expert
August 3, 2020

you're welcome.

Translate
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();

}

Translate