2 Replies Latest reply on Sep 20, 2011 8:24 AM by soulfunkifiedjazz

    use buttons to go to a specific spot in the timeline

    soulfunkifiedjazz

      I have a flash document that publishes to an swf I embedd into an html page. The flass is made up of three movie clips that I have managed to program to run in succession and then loop. Each movie clip (frame 1, frame 2 and frame 3) drill down into their own animation. I set the movie up this way so that each of the animations could be linked to a different web page. Now I want to add navigation within the flash itself by creating three dots that when clicked will send the movie to frame 1, 2 or 3. I can't seem to find an example of this and am just not well versed enough in script to figure this out.

       

      So to be clear, if you click on the first dot, I want to restart the move at the first movie clip, the second dot goes to the begining of the second move, and the third... you got it.

       

      I am using Flash CS4 and AS3. Thanks in advance.

        • 1. Re: use buttons to go to a specific spot in the timeline
          McbainGames11 Level 2

          on time line have:

           

          yourBTN.addEventListener(MouseEvent.CLICK, clickme);

          function clickme(event:MouseEvent)

          {

           

          yourBTN.gotoAndPlay(1); //this is to play your animation for btn 1

           

          }

           

          yourBTN.addEventListener(MouseEvent.CLICK, clickme2);

          function clickme2(event:MouseEvent)

          {

           

          yourBTN2.gotoAndPlay(1); //this is to play your animation for btn 1

           

          }

           

          yourBTN.addEventListener(MouseEvent.CLICK, clickme1);

          function clickme2(event:MouseEvent)

          {

           

          yourBTN3.gotoAndPlay(1); //this is to play your animation for btn 1

           

          }

           

           

          now go to the last frame of your animations inside yourBTN's 1 , 2 and 3 and type:

           

          MovieClip(root).gotoAndPlay(2);

           

          MovieClip(root).gotoAndPlay(3);

           

          MovieClip(root).gotoAndPlay(1);

           

           

          and replicate these codes like so...

           

           

          SO WHEN YOU CLICK EACH BUTTON IT WILL GO INSIDE THE BUTTON CLICKED, ANIMATE AS YOU MADE THEN ON LAST FRAME YOU WILL TELL IT TO GOTO STAGE AND GOTO FRAME/PAGE.

           

           

          • 2. Re: use buttons to go to a specific spot in the timeline
            soulfunkifiedjazz Level 1

            Sorry for the delayed Thanks... Hard drive crashed - and everyone is having second thoughts about using flash...I will check out this code and let you know how I made out. Thank you very much for responding.