3 Replies Latest reply on Sep 20, 2006 7:37 AM by kglad

    button jumps to next frame when clicked twice

    tharrison159
      Hi, i have a small problem,
      i have a button in level 0 with the code:

      on (release) {
      with (_level1) gotoAndPlay();
      with (_level2) gotoAndPlay(7);
      }


      It loads movies into level 1 and 2, the problem i am having is that when the button is clicked twice it will jump to the next frame in the movie i.e when clicked once it jumps to frame 7 as it is supposed to do but then its clicked again and jumps to frame 8

      any help appreciated thanks.
        • 1. Re: button jumps to next frame when clicked twice
          aniebel Level 2
          I've had this problem and even though I'm sure there's a better way to fix it, I'll tell you what I've done. I personally try to keep all my code on the main timeline instead of attaching it to a button. Not sure this is something that will help and I don't think it's the cause of your problem but it will make things easier in the long run since all your code is in one place. It's easier than jumping all over your FLA to find code.

          Now, back to your issue... I've done one of two things to fix this.
          1.) change the "gotoAndPlay()" to a "gotoAndStop()"
          2.) remove the "stop();" from frame 7, and move it to the next frame if you have room. I usually leave a few extra frames between each "section" keyframe in case I need to put anything else in

          The second recommendation has worked best for me. I hope, if there's a better way, someone will post it so I can benefit from it also.
          • 2. Re: button jumps to next frame when clicked twice
            tharrison159 Level 1
            well thing is i have an 80 frame movie which i need to jump to each frame individually and i have stops on all of them, isnt there a simpler way?
            • 3. Re: button jumps to next frame when clicked twice
              kglad Adobe Community Professional & MVP
              1's not very much work.