1 Reply Latest reply on Sep 6, 2009 5:49 PM by kglad

    how to control only loop the movie twice

    wongmaria

      HI

      I'm a very beginner and I have downloaded a movie script and but I cannot make the movie stop looping.

      How I can change this script and make it stop after looping twice.

       

       

      the script as following:

       

      time = "9";
      _root.star.circle_star._visible = 0;
      _root.star.circle_star.i = 1;
      _root.star.circle_star.onEnterFrame = function() {
          if (this.i%time == 1) {
              this.duplicateMovieClip("circle_star"+this.i,this.i);
          }
          this.i++;
          if (this.i == 2) {
              exit;
          }
      };

        • 1. Re: how to control only loop the movie twice
          kglad Adobe Community Professional & MVP
          use:

           

          time = "9";
          _root.star.circle_star._visible = 0;
          _root.star.circle_star.i = 1;
          _root.star.circle_star.onEnterFrame = function() {
              if (this.i%time == 1) {
                  this.duplicateMovieClip("circle_star"+this.i,this.i);
              }
              this.i++;
              if (this.i == 2) {
                delete this.onEnterFrame;
              }
          };