Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > ColorTransform (flash.geom.ColorTransform) | |||
Object
|
+-flash.geom.ColorTransform
public class ColorTransform
extends Object
The ColorTransform class lets you mathematically adjust all of the color values in a movie clip. The color adjustment function or color transformation can be applied to all four channels: red, green, blue, and alpha transparency.
When a ColorTransform object is applied to a movie clip, a new value for each color channel is calculated like this:
redMultiplier) + redOffsetgreenMultiplier) + greenOffsetblueMultiplier) + blueOffsetalphaMultiplier) + alphaOffsetIf any of the color channel values is greater than 255 after the calculation, it is set to 255. If it is less than 0, it is set to 0.
You must use the new ColorTransform() constructor to create a ColorTransform object before you can call the methods of the ColorTransform object.
Color transformations do not apply to the background color of a movie clip (such as a loaded SWF object). They apply only to graphics and symbols that are attached to the movie clip.
Availability: ActionScript 1.0; Flash Player 8
colorTransform (Transform.colorTransform property)
|
Modifiers |
Property |
Description |
|---|---|---|
|
|
A decimal value that is multiplied by the alpha transparency channel value. |
|
|
|
A number from -255 to 255 that is added to the alpha transparency channel value after it has been multiplied by the |
|
|
|
A decimal value that is multiplied by the blue channel value. |
|
|
|
A number from -255 to 255 that is added to the blue channel value after it has been multiplied by the |
|
|
|
A decimal value that is multiplied by the green channel value. |
|
|
|
A number from -255 to 255 that is added to the green channel value after it has been multiplied by the |
|
|
|
A decimal value that is multiplied by the red channel value. |
|
|
|
A number from -255 to 255 that is added to the red channel value after it has been multiplied by the |
|
|
|
The RGB color value for a ColorTransform object. |
Properties inherited from class Object constructor (Object.constructor property), __proto__ (Object.__proto__ property), prototype (Object.prototype property), __resolve (Object.__resolve property)
|
Signature |
Description |
|---|---|
|
ColorTransform |
Creates a ColorTransform object for a display object with the specified color channel values and alpha values. |
|
Modifiers |
Signature |
Description |
|---|---|---|
|
|
concat |
Applies a second, additive color transformation to the movie clip. |
|
|
Formats and returns a string that describes all of the properties of the ColorTransform object. |
Methods inherited from class Object
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/00001535.html