1 Reply Latest reply on Jan 28, 2009 6:12 PM by kglad

    Prev & Next button goes to prev or next LABEL

    Pigeon7081
      I'm trying to make an interactive presentation reminiscent of powerpoint but I can't get the prev and next buttons to work. Here's what I have...

      a MC with all the images (sudo slides). The timeline begins with a stop action on frame1. Each image has a 15-frame Alpha fade which has a frame label on the first frame and a stop action on the last frame (so frame label "img1" goes from frame2 to frame16 then stops, frame label "img2" goes from frame17 to frame 32 then stops, etc.)

      Outside of that MC in the main timeline I have the buttons prevBtn and nextBtn. What I need to do is get those buttons to go to the next label.

      I know I can do gotoAndPlay("img2"); but I want the button to go to the next frame label no matter what it's named.

      I tried an array but I've never dealt with arrays before so I don't think I did it right. The code I have for the array is:

      mylabels = new array("img1","img2","img3");
      currentLabel = 0;

      //Go to next label
      gotoAndPlay(mylabels[(currentLabel + 1)]);

      //Go to previous label
      gotoAndPlay(mylabels[(currentLabel - 1)]);

      I got this from someone else who was trying to help but I don't know where to put any of it or if it will even do what I need.

      I've also tried to use the _currentFrame+15 or _currentFrame-15 but that doesn't work either. I only know a small amount of AS so I may have done that one wrong too....

      Any help would be appreciated. (btw, i'm using AS2 and Flash CS3)