5 Replies Latest reply on Jul 12, 2007 11:06 AM by joyful2

    Button Problems

      I am working on a button that I need help with. The button will move up on mouseover and I want it to stay in the up position. What I need help with is getting the button to stay in the "up" position once the mouse has rolled out and until it is rolled over again. The button also goes to a specific frame on mouseover. Please help asap as this is for a client who is growing impatient with me.

      Thanks in advance,

        • 1. Re: Button Problems
          joyful2 Level 1
          I forgot to mention that I am using Flash Pro 8 version.

          • 2. Re: Button Problems
            CodeManNew Level 1
            for this type of effect, you will need to use a movie clip symbol... it will not work with a button symbol...
            • 3. Re: Button Problems
              joyful2 Level 1
              Thank you. Do you know how I would make the icon (formerly button) work like the ones in the flash movie at www.ibm.com. I can't find anything on how to do that and I am desperate. Thanks.
              • 4. Re: Button Problems
                CodeManNew Level 1

                Basically, each button is a movie clip that allows it to stay in the down position once the user moves on to another button. A regular button won't do this because it's designed to go back to the up position when the user rolls off of it. That's where a movie clip symbol works much better.

                I looked at ibm.com and I believe this is what you want:

                button example

                Bascially each button is a movie clip that contains its own up, over and down states, designated by frame labels on the timeline inside the button_mc movie clip.

                ActionScript deals with the rollOver, rollOut, and release... once the user releases the button it stays in the "down" position until the user clicks on another button.

                The next challenge is turning those clicks into navigation without recreating the button every time. There are several ways to do this... but here's how I did it. There is only one button_mc symbol, and it is used in three instances... each with its own instance name -- button1, button2, button3... when released, ActionScript slices off the button number and sends that to a navigation function... which reads an array of frame labels in the main timeline... labels like slide1, slide2, slide3...and goes there...

                If you are new to ActionScript, this may sound all Greek... the easiest thing is probably to download the source file I created and play around with it... you can easily change colors, content, etc. The main code is in the first frame of the main timeline....and on the invisible button inside the button_mc symbol.

                Doing it this way allows you to use as many buttons (up to nine as you want) without making new button_mc symbols each time... just copy the button to the location you wish, give it a new instance name, add to the array of labels, and label a new point in the main timeline and you're set.

                The source file in Flash 8 is at http://www.lehman-meyer.com/flash_examples/ ... just right click and select Save Target As on the button_example.fla file.

                • 5. Re: Button Problems
                  joyful2 Level 1
                  Thank you very, very much for your help. I will play around with the source file and see what I can come up with :).