A-C > Color (object) |
![]() ![]() ![]() |
Color (object)
The Color object lets you set the RGB color value and color transform of movie clips and retrieve those values once they have been set.
You must use the constructor new Color()
to create an instance of the Color object before calling its methods.
The Color object is supported by Flash 5 and later versions of the Flash Player.
Method Description 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
setRGB
call.
setTransform
call.
Constructor for the Color object
Availability
Flash Player 5.
Usage
new Color
(target
)
Parameters
target
The instance name of a movie clip.
Returns
Nothing.
Description
Constructor; creates an instance of the Color object for the movie clip specified by the target
parameter. You can then use the methods of that Color object to change the color of the entire target movie clip.
Example
The following example creates an instance of the Color object called myColor
for the movie clip myMovieClip
and sets its RGB value:
myColor = new Color(myMovieClip); myColor.setRGB(0xff9933);
![]() ![]() ![]() |