Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > ColorTransform (flash.geom.ColorTransform) > alphaMultiplier (ColorTransform.alphaMultiplier property) | |||
public alphaMultiplier : Number
A decimal value that is multiplied by the alpha transparency channel value.
If you set the alpha transparency value of a movie clip directly by using the MovieClip._alpha property, it affects the value of the alphaMultiplier property of that movie clip's ColorTransform object.
Availability: ActionScript 1.0; Flash Player 8
The following example creates the ColorTransform object colorTrans and adjusts its alphaMultiplier value from 1 to 0.5.
import flash.geom.ColorTransform;
import flash.geom.Transform;
var colorTrans:ColorTransform = new ColorTransform();
trace(colorTrans.alphaMultiplier); // 1
colorTrans.alphaMultiplier = 0.5;
trace(colorTrans.alphaMultiplier); // 0.5
var rect:MovieClip = createRectangle(20, 80, 0x000000);
var trans:Transform = new Transform(rect);
trans.colorTransform = colorTrans;
function createRectangle(width:Number, height:Number, color:Number, scope:MovieClip):MovieClip {
scope = (scope == undefined) ? this : scope;
var depth:Number = scope.getNextHighestDepth();
var mc:MovieClip = scope.createEmptyMovieClip("mc_" + depth, depth);
mc.beginFill(color);
mc.lineTo(0, height);
mc.lineTo(width, height);
mc.lineTo(width, 0);
mc.lineTo(0, 0);
return mc;
}
_alpha (MovieClip._alpha property)
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00001536.html