EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Alphamultiplier (Colortransform.alphamultiplier Property)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ColorTransform (flash.geom.ColorTransform) 431
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
Example
The following example creates the ColorTransform object
colorTrans and adjusts its
alphaMultiplier value from 1 to .5.
import flash.geom.ColorTransform;
import flash.geom.Transform;
var colorTrans:ColorTransform = new ColorTransform();
trace(colorTrans.alphaMultiplier); // 1
colorTrans.alphaMultiplier = .5;
trace(colorTrans.alphaMultiplier); // .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;
}
See also
_alpha (MovieClip._alpha property)

Table of Contents

Related product manuals