2 Replies Latest reply on Oct 25, 2007 8:45 PM by clbeech

    Linking keyframes

    doglover3
      I am using CS3. I asked earlier how one keyframe can be hyperlinked to go to another keyframe (frame 325 to 120)after the "home" button is hit. The answer I received was: place a button symbol on frame 325 with the following script: on (release) {gotoAndPlay(120);} I tried and there MUST be a step or two missing----I cannot do it. Where is the release button, where is the {gotoand Play(120) and is that a colon or semi-colon at the end? A million thank you's to whomever can assist!
        • 1. Re: Linking keyframes
          nstanz
          make sure you add this script to the button and not the frame
          on(release) {
          gotoAndPlay(120);
          }

          Or name the button "myButton" and add the following to the keyframe 325
          myButton.onRelease = function() {

          this.gotoAndPlay(120);
          }
          • 2. Re: Linking keyframes
            clbeech Level 3
            these codes are for AS2, you must have your publish settings set for AS2 if you are using CS3, or Flash will need AS3 code. also, in Flash CS3 you can no longer 'attach' code to Objects, and they must be placed on the timeline.

            If you are using AS2, and using the timeline, the code provided above will attempt to move the playhead on the myButton timeline to frame120, remove the 'this' keyword as it is refering to the scope of the button instance.

            So use one of the following for AS2 or AS3: