3 Replies Latest reply on Apr 16, 2008 7:12 AM by kglad

    random linking in flash

    paulworthy
      Hi,

      I am having problems with links in Flash using actionscript 2

      I have some buttons which link to a specific frame using this code:

      on (release) {
      gotoAndPlay("2");
      }

      And some buttons linking to next and previous frames using this code:

      on (release) {
      gotoAndPlay("nextFrame");
      }

      on (release) {
      gotoAndPlay("prevFrame");
      }

      The links just seem to be linking to anywhere on the timeline and I just can't figure out why. Has anyone come across this before, would appreciate any help.

      Thanks, Paul
        • 1. Re: random linking in flash
          kglad Adobe Community Professional & MVP
          those are simple buttons, correct?

          you have frames labeled "nextFrame" and "prevFrame"? and you don't mean to be using nextFrame() and prevFrame(), do you?
          • 2. Re: random linking in flash
            paulworthy Level 1
            Hi, thanks for the response.

            Basically, I have a gallery, with pictures on consecutive frames on the time-line. I made a next button and previous button and I used the code exactly as is written above for each respective button. The next frame command seems to work Ok but as soon as you hit previous button it goes haywire, seemingly linking to any frame on the time-line.

            Have I used the wrong code.

            kind regards,
            Paul
            • 3. Re: random linking in flash
              kglad Adobe Community Professional & MVP
              you didn't answer any of the questions so i suspect you don't know what you're doing. try changing:

              on (release) {
              gotoAndPlay("nextFrame");
              }

              to

              on (release) {
              nextFrame();
              }

              and change

              on (release) {
              gotoAndPlay("prevFrame");
              }

              to

              on (release) {
              prevFrame();
              }