5 Replies Latest reply on Aug 30, 2009 2:45 PM by kglad

    MC and BTN

    uxk Level 1

      Hi, Just to clarify. The actiosncript AS2 for the menu1_btn and menu2_btn do not work. When I replace it (menu1_mc) to a Movie Clip, then the hitTest works. In this example, menu1_mc is a MC whereas menu2_btn and menu3_btn are Button symbols.   I am curious to know if buttons do not work with actionscripts, then how do we create a rollOver (change in color) effect when the mouse is over a button. Please clarify.

      Thank you

        • 1. Re: MC and BTN
          kglad Adobe Community Professional & MVP

          you can use actionscript for movieclips and for buttons.


          to create rollover etc effects for a movieclip button, create the needed frames and use gotoAndStop() methods in your mouse handlers.


          never convert a button to a movieclip and do not convert a movieclip to a button.  you can convert a shape to either.

          • 2. Re: MC and BTN
            uxk Level 1

            This is what I did with the BTN menus. If you take a look at my fla file attached. Why the actionscripts do not work on the BTN?

            I have not converted the btn to MC or MC to BTN, instead, for menu1_mc, I created it from a shape.

            Please clarify.

            • 3. Re: MC and BTN
              kglad Adobe Community Professional & MVP

              your use of switch-case is incorrect.  read the flash help files for the correct use of switch().

              • 4. Re: MC and BTN
                uxk Level 1

                So how come the switch works with the Movie Clip and not with the Button. This is what I do not understand.

                Please elaborate if you can with an example.


                • 5. Re: MC and BTN
                  kglad Adobe Community Professional & MVP

                  it's not going to work the way you want even for movieclips.  but buttons don't have a hitTest() method.


                  you can create a hitTest for buttons using:


                  Button.prototype.hitTest = MovieClip.prototype.hitTest;