434
ActionScript classes
colorTrans.blueOffset = 255;
trace(colorTrans.blueOffset); // 255
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;
}
ColorTransform constructor
public ColorTransform([redMultiplier:Number], [greenMultiplier:Number],
[blueMultiplier:Number], [alphaMultiplier:Number], [redOffset:Number],
[greenOffset:Number], [blueOffset:Number], [alphaOffset:Number])
Creates a ColorTransform object for a display object with the specified color channel values
and alpha values.
Availability:
ActionScript 1.0; Flash Player 8
Parameters
redMultiplier
:Number
[optional] - The value for the red multiplier, in the range from 0 to
1. The default value is 1.
greenMultiplier
:Number
[optional] - The value for the green multiplier, in the range from
0 to 1. The default value is 1.
blueMultiplier
:Number
[optional] - The value for the blue multiplier, in the range from 0
to 1. The default value is 1.
alphaMultiplier
:Number
[optional] - The value for the alpha transparency multiplier, in
the range from 0 to 1. The default value is 1.
redOffset
:Number
[optional] - The offset for the red color channel value (-255 to 255). The
default value is 0.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...