1 Reply Latest reply on Nov 7, 2014 7:07 AM by kglad

    How do I create a rollover movieclip button?

    sean2148 Level 1

      I'm very new to Flash and would like to know firstly how I create a movieclip, and then how to make the movieclip into a rollover button (having the animation play when the cursor is over the button, and it pausing/restarting when taken off). Preferably in a step by step guide, thanks for any help!

        • 1. Re: How do I create a rollover movieclip button?
          kglad Adobe Community Professional & MVP

          click insert>new symbol>movieclip.

           

          on the timeline create your movieclip animation.

           

          add a layer to frame 1 and add the following code:

           

          stop();

           

          open your library and drag your movieclip from the library to the main timeline/stage.  in the properties panel assign an instance name, eg mc

           

          open the actions panel and add:

           

          mc.addEventListener(MouseEvent.MOUSE_OVER,overF);

          mc.addEventListener(MouseEvent.MOUSE_OUT,outF);

           

          function overF(e:MouseEvent):void{

          MovieClip(e.currentTarget).play();

          }

          function outF(e:MouseEvent):void{
          MovieClip(e.currentTarget).gotoAndStop(1);

          }

          1 person found this helpful