User Login





Register
Forget Password

Hostings with very low prices

Hosting Plans Starting at 1$/Month

BaydHost

Powered By

  • AhmBay
  • Make a simple rollover state with an alpha effect - ActionScript Webmaster Tips, Knowledge Base Webmaster Tools

    Home > ActionScript > Make a simple rollover state with an alpha effect
    Category: ActionScript
    Written by: Admin
    Date: 2008-11-10
    Rating: 0   Puan:0 | Katılımcı:0 | Voted : 0 times
    Hit: 24
      

    In this Macromedia Flash tutorial I will show you how to make a simple rollover state with an alpha effect in just a few easy steps.












    1.
    Start by importing the image you want to add this effect to, as I did in the image below.










    2.
    Right click and convert it to a button.
    In the properties panel name it something, I just named it "aa".
    Click somewhere on the stage and go to the actionscript panel, type in the following code line.



    _root.aa._alpha = 40



    This tells the image to be at an alpha level of 40 percent when the movie starts.










    3.
    Now click the button once and go to the actionscript panel and type in the following code.



    on (rollOver) {
    _alpha = 260
    }



    on (rollOut) {
    _alpha = 140
    }



    The first part tells the image to be at an alpha of 260 (or acturlly only 200 because we started at a level 40), when the mouse is over the image.



    The next part tells the image to be 140 when the mouse is not on the image.