7 Replies Latest reply on May 4, 2016 8:16 AM by ClayUUID

    Looping a movie clip x amount of times - Animate

    giladn79569533

      Hi all,

       

      I'm trying to find a code to loop a certain MC 2 or 3 times.

      I found this code in the forums which was very useful, the thing is that the animation is not on the main timeline, but inside a MC:

       

      if(!this.alreadyExecuted){

      this.alreadyExecuted=true;

      this.loopNum=1;

      } else {

      this.loopNum++;

      if(this.loopNum==1){

      this.stop();

      }

      }

       

      Is there away to modify the code for it?

      (The MC named "bannermc" if that's needed)

       

      Thank you!