Alpha Property

Alpha Property

Flash CS4 ActionScript 3.0 Tutorial

 

How to Assign Alpha Property to Button Symbols, Movie Symbols and Text with ActionScript in Flash

 

 

The Alpha property controls an object's transparency. Acceptable values range from zero to one, with zero being transparent and one appearing opaque.

Tutorial Elements

Movie Symbol with instance name alphaMovie_mc

 

Step One

Add a Movie Symbol to the stage.

Step Two

Select the object and open the Properties panel (Cmd/F3 (PC-Ctrl/F3)). Type in the name alphaMovie_mc for the Instance Name.

Step Three

Add a new layer called Actions.

Step Four

Option double-click (PC - Alt double-click) the keyframe in the Actions layer to open the ActionScript panel.

Step Five

Copy/Paste the following code to the ActionScript panel.

alphaMovie_mc.alpha = .5;

Step Six

Test your movie by pressing Cmd/Return (PC - Ctrl/Enter). By setting alpha equal to .5, the object's transparency is set to 50%.

Layers of Images

The alpha setting can be used to fade images over time and allow the viewer to see multiple layers of imagery.

 

DAZ Studio FREE 3D MODELS AND SOFTWARE