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:

If 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

See also

colorTransform (Transform.colorTransform property)

Property summary

Modifiers

Property

Description

 

alphaMultiplier:Number

A decimal value that is multiplied by the alpha transparency channel value.

 

alphaOffset:Number

A number from -255 to 255 that is added to the alpha transparency channel value after it has been multiplied by the alphaMultiplier value.

 

blueMultiplier:Number

A decimal value that is multiplied by the blue channel value.

 

blueOffset:Number

A number from -255 to 255 that is added to the blue channel value after it has been multiplied by the blueMultiplier value.

 

greenMultiplier:Number

A decimal value that is multiplied by the green channel value.

 

greenOffset:Number

A number from -255 to 255 that is added to the green channel value after it has been multiplied by the greenMultiplier value.

 

redMultiplier:Number

A decimal value that is multiplied by the red channel value.

 

redOffset:Number

A number from -255 to 255 that is added to the red channel value after it has been multiplied by the redMultiplier value.

 

rgb:Number

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)


Constructor summary

Signature

Description

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.

Method summary

Modifiers

Signature

Description

 

concat(second:ColorTransform) : Void

Applies a second, additive color transformation to the movie clip.

 

toString() : String

Formats and returns a string that describes all of the properties of the ColorTransform object.

Methods inherited from class Object

addProperty (Object.addProperty method), hasOwnProperty (Object.hasOwnProperty method), isPropertyEnumerable (Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf method), registerClass (Object.registerClass method), toString (Object.toString method), unwatch (Object.unwatch method), valueOf (Object.valueOf method), watch (Object.watch method)



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