3 Replies Latest reply on Dec 6, 2011 7:39 PM by Ned Murphy

    Click to go to different frame

    katelynkn25

      I am trying to link a button to go to a certain part of the timeline. As I am aware all you have to do is go to the button, actions > code snippets > timeline navigation > click to go to frame & play, and then type in the frame number in your code of which frame you want it to go to. I did all of this and it does nothing. Can anyone give me pointers? Is there anything else I can show you so that maybe you can help me? I am using CS5.5. Greatly appreciate the help!

       

      Thanks

        • 1. Re: Click to go to different frame
          Ned Murphy Adobe Community Professional & MVP

          I doubt any of the follks that help here use code snippets to create code, so if you show the code that will be a good starting point.  If you happen to get any errors that will also be helpful to know.

          • 2. Re: Click to go to different frame
            katelynkn25 Level 1

            This is the code that goes into my button:

             

            movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_8);

            function fl_ClickToGoToAndPlayFromFrame_8(event:MouseEvent):void
            {
            gotoAndPlay(160);
            }

             

            I obviously want it to go to frame 160 when you click the button.

             

            No errors yet..

            • 3. Re: Click to go to different frame
              Ned Murphy Adobe Community Professional & MVP

              The code itself looks fine, so I have to wonder if the button your are clicking is not the instance that has the code assigned to it.

               

              You said the code goes into your button.  Do you mean it goes in the timeline that contains the button?  If so, what frame is that button on, what frame is the code on, and do you happen to have more than one keyframe of that button on the timeline?  If not, where is the code?