Make a simple rollover state with an alpha effect


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.

Photoshop Tutorial thumb picture


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.

Photoshop Tutorial thumb picture


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.

 

0tutor.com rss feed