• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

New Here ,
Jul 30, 2020 Jul 30, 2020

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

TOPICS
ActionScript , Ad development , Code , How to , Timeline

Views

440

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 01, 2020 Aug 01, 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();

}

Votes

Translate

Translate
Community Expert ,
Aug 01, 2020 Aug 01, 2020

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

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 01, 2020 Aug 01, 2020

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2020 Aug 02, 2020

Copy link to clipboard

Copied

Thanks both – it's always the simplest answer.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 03, 2020 Aug 03, 2020

Copy link to clipboard

Copied

LATEST

you're welcome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines