Copy link to clipboard
Copied
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
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();
}
Copy link to clipboard
Copied
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();
}
Copy link to clipboard
Copied
So put that code where you want it to stop. What's the problem?
Copy link to clipboard
Copied
Thanks both – it's always the simplest answer.
Copy link to clipboard
Copied
you're welcome.