Colortransform Constructor - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

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
1. The default value is 1.
greenMultiplier:Number
0 to 1. The default value is 1.
blueMultiplier:Number
to 1. The default value is 1.
alphaMultiplier:Number
the range from 0 to 1. The default value is 1.
[optional] - The offset for the red color channel value (-255 to 255). The
redOffset:Number
default value is 0.
434
ActionScript classes
[optional] - The value for the red multiplier, in the range from 0 to
[optional] - The value for the green multiplier, in the range from
[optional] - The value for the blue multiplier, in the range from 0
[optional] - The value for the alpha transparency multiplier, in

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF