8 Replies Latest reply on Dec 11, 2009 11:17 AM by andrewmcgibbon

    Trouble with Looping in AS1

    andrewmcgibbon Level 1

      I am trying to loop through a flash file 2x and then have it gotoandstop on frame 1. Here is the code I am using. I have this code in another file and it works perfectly, however on the present file it is looping through 1x and stopping on frame 1 and I can't make it loop 2x. Any help would be greatly appreciated.

      AS in frame 1:

      var i:Number;

      AS in final frame, frame 80:

      if (i < 2){
      gotoAndPlay(1);
      i++;
      }
      else {
      gotoAndStop(1);
      }