Color class
Availability
Flash Player 5.
Description
The Color class 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
Method summary for the Color class
Method
Color.getRGB()
Color.getTransform()
Color.setRGB()
Color.setTransform()
Constructor for the Color class
Availability
Flash Player 5.
Usage
new Color(target_mc:Object) : Color
Parameters
The instance name of a movie clip.
target_mc
Returns
A reference to a Color object.
Description
Constructor; creates a Color object for the movie clip specified by the
can then use the methods of that Color object to change the color of the entire target movie clip.
Example
The following example creates a Color object called
its RGB value to orange:
var my_color:Color = new Color(my_mc);
my_color.setRGB(0xff9933);
ActionScript Language Reference
to create a Color object before calling its methods.
new Color()
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.
setRGB()
setTransform()
target_mc
for the movie clip
my_color
CHAPTER 2
call.
call.
parameter. You
and sets
my_mc
Color class
207
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers