A-C > Color (object)
Color (object)The Color object allows you to set and retrieve the RGB color value and color transform of movie clips. The Color object is supported by Flash 5 and later versions of the Flash Player.
You must use the constructor new Color()
to create an instance of the Color object before calling the methods of the Color object.
Returns the numeric RGB value set by the last Returns the transform information set by the last Sets the hexadecimal representation of the RGB value for a Color object. Sets the color transform for a Color object.
Method summary for the Color object
Method
Description
getRGB
setRGB
call.
getTransform
setTransform
call.
setRGB
setTransform
Constructor for the Color object
Syntax
new Color
(target
);
Arguments
target
The name of the movie clip the new color is applied to.
Description
Constructor; creates a Color object for the movie clip specified by the target
argument.
Player
Flash 5 or later.
Example
The following example creates a new Color object called myColor
for the movie myMovie
:
myColor = new Color(
myMovie
);