5 Replies Latest reply on Dec 17, 2006 4:51 AM by DazFaz

    Button Functions

    johnnewc
      So I have five buttons on my site and I need them to link to differant scenes. This is the code I am using. the problem I am having is the buttons don't seem to go to the right scene. I have been trouble shooting it all day. Can someone tell me what I'm doing wrong here. Thank you

        • 1. Re: Button Functions
          DazFaz Level 1
          Hi,

          Try taking the quotes "" out from around the numbers.
          e.g.

          whatido.onRelease = function() {
          gotoAndPlay("whatido", 1);
          };
          • 2. Re: Button Functions
            johnnewc Level 1
            Nope that didn't work. Should I have all the functions in the same action frame, or do I put them in the MC frame
            • 3. Re: Button Functions
              Sketchsta Level 1
              I never use scenes in flash work, so i'm not 100% sure.

              But i always thought you specify the "scene" first, then the " frame"
              • 4. Re: Button Functions
                Sketchsta Level 1
                unless thats what you were doing... in which case, forget what i just said. =)
                • 5. Re: Button Functions
                  DazFaz Level 1
                  Hi,

                  You said:
                  "Nope that didn't work. Should I have all the functions in the same action frame, or do I put them in the MC frame"

                  Now thats thrown me a little here.

                  When you say "MC", what movieClip are you refering to.

                  I put a quick flash file together using the scenes and one set of buttons on the very first scene.

                  Then I place the code for the four buttons on the very first frame of the very first scene.

                  Ran the file in flash and it worked no problem.

                  That was using

                  myButton.onRelease = function(){
                  gotoAndStop("Ascene",1);//Without the quotes
                  }
                  as an example.

                  So to try and get to your problem here are a few questions:
                  1. Have you created 4 seperate scenes in your file (SHIFT+F2)
                  2. Have you named all your scenes other than the default names e.g. Scene 1,Scene 2 etc
                  3. Are your nav buttons on the very first scene
                  4. Are your nave buttons actual "buttons" or are they "movieClips"
                  5. What version of flash are you using.

                  failing that you can send me your file dazfaz (at) hotmail.com and I will take a look at your problem for you.