3 Replies Latest reply on May 27, 2009 5:08 AM by smikerboyz

    Hovering buttons


      Hi, I am not new in flash but I haven't mastered the actionscript yet.


      I want to know the actionscript for when hovering over a button which is a picture, the whole screen fades into a translucent grey (with everything else still in the background) and have a larger version of my picture appearing on top of the grey.  And when the mouse leaves the button, the grey and the larger version of the picture will fade out and return back to my original.  So anyone have any quick yet easy ways to achieve this?  Thanks!

        • 1. Re: Hovering buttons
          Ned Murphy Adobe Community Professional & MVP

          Try creating a movieclip that covers the stage that does the transition for the darkening/graying and has the larger image sitting above the darkener. Once you have it created, place it on a layer above all other layers of the main timeline, give it an instance name (let's say "darkener"), and make the first frame within it a blank keyframe with a stop(); in that frame (after you have it positioned).


          Give your button an instance name, let's say btn1, and place the following code in the timeline


          btn1.onRollOver = function(){




          btn1.onRollOut = function(){



          • 2. Re: Hovering buttons
            smikerboyz Level 1

            Ok thanks! I think I understand it.  Where should I paste the code? In the original timeline or in the timeline of my movieclip?

            • 3. Re: Hovering buttons
              Ned Murphy Adobe Community Professional & MVP

              The code will sit on the timeline that contains the button, on its own layer, preferably