3 Replies Latest reply on Mar 2, 2007 4:34 AM by aniebel

    Button not working!!!

    Sara McLaughlin
      Hi there-
      Ok, as a disclaimer i am teaching myself flash right now although i do have a good curve in that i am familiar with a lot of other design programs.
      I am creating a movie- and i created a continue button that the user will click to well, continue onto the next part of the movie. I've used scriptassist to come up with the following code:
      on (release) {
      gotoAndPlay(101);
      }
      In the stage if enable simple buttons is on, the button works but if i test the movie or publish it the mouse doesn't recognize the word 'continue' as a button.

      i am at a loss so any help would be appreciated!

      thanks
      sara
        • 1. Re: Button not working!!!
          EricSalvi
          quote:

          Originally posted by: Sara McLaughlin
          In the stage if enable simple buttons is on, the button works but if i test the movie or publish it the mouse doesn't recognize the word 'continue' as a button.


          I am confused by this. So you mean when you preview the movie or test the movie (ctrl+enter) the button action script doesn't work? how many times are you using this button on the timeline? Just one continue? also the button is on the main timeline, and if that be the case then you also added the on (release) code onto the button? I just need some answers because I am either confused or tired. I hope I can help.

          • 2. Re: Button not working!!!
            Sara McLaughlin Level 1
            Sorry fot the confusion... like i said.. beginner.
            so yes, when i preview the movie or test the movie the button action script doesn't work (the cursor doesn't even turn to a finger or recognize it as a link) this is the only time (so far) i am using the button in the timeline. as far as the main timeline.. i am not really sure. the code is on the button- according to the actions panel. maybe i just need to start the button from scratch. i mean does it sound like i am doing things right?

            sara
            • 3. Re: Button not working!!!
              aniebel Level 2
              Are you sure that the button does not have any keyframes on it on the main timeline? If you place the code on the button on, say, frame 1 but at frame 5 you have a keyframe, the code may or may not be on the button at that new keyframe.

              Putting code on buttons can lead to issues like this. Try this out for size... create a layer and call it "actions". Lock it so you don't accidentally place any symbols on it. It's only for code. Give your button an instance name in the Properties panel... something like "continue_btn". Cut the current code from your button. Select the first keyframe on the actions layer (assuming the button exists on the timeline in frame 1) and paste that code into it. Now edit the code to look like this: