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

Help looping frames within timeline

New Here ,
Oct 10, 2017 Oct 10, 2017

Copy link to clipboard

Copied

Hi

I need banner ad to loop 2 times between frames 1 and  290, then continue to frame 291 and stop on frame 400. I found another post  but it's not working. Could someone help me out? Thanks so much

Views

327

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

Enthusiast , Oct 11, 2017 Oct 11, 2017

PUT ON FRAME 290

if (!this.looped) {

     this.looped = 1;

}

if (this.looped++ == 2) {

     this.play();

} else {

     this.gotoAndPlay(1);

}

UNCHECK LOOP TIMELINE OR PUT ON LAST OR FRAME 400

this.stop();

Votes

Translate

Translate
Community Expert ,
Oct 10, 2017 Oct 10, 2017

Copy link to clipboard

Copied

for canvas/html5, on frame 1

if(!this.playnum){

this.playnum=1;

} else {

this.playnum++;

}

on frame 290

if(this.plan<3){ // plays twice, if you want 3 times, do the obvious

this.gotoAndPlay(1);

}

on frame 400

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
New Here ,
Oct 11, 2017 Oct 11, 2017

Copy link to clipboard

Copied

Hi, sorry this didn't work for me. It plays through and stops at frame 400.

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
Enthusiast ,
Oct 11, 2017 Oct 11, 2017

Copy link to clipboard

Copied

PUT ON FRAME 290

if (!this.looped) {

     this.looped = 1;

}

if (this.looped++ == 2) {

     this.play();

} else {

     this.gotoAndPlay(1);

}

UNCHECK LOOP TIMELINE OR PUT ON LAST OR FRAME 400

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
New Here ,
Oct 11, 2017 Oct 11, 2017

Copy link to clipboard

Copied

LATEST

That worked in combination with kglad. THANKS

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