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

Actionscript 2.0 language reference
Table of Contents

Advertisement

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
property, it affects the value of the
MovieClip._alpha
movie clip's
ColorTransform
Availability: ActionScript 1.0; Flash Player 8
Example
The following example creates the ColorTransform object
value from 1 to .5.
alphaMultiplier
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)
object.
ColorTransform (flash.geom.ColorTransform)
property of that
alphaMultiplier
and adjusts its
colorTrans
431

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents