A-C > Color.setRGB |
![]() ![]() ![]() |
Color.setRGB
Availability
Flash Player 5.
Usage
myColor
.setRGB(0x
RRGGBB
)
Parameters
0x
RRGGBB
The hexadecimal or RGB color to be set. RR
, GG
, and BB
each consist of two hexadecimal digits specifying the offset of each color component. The 0x
tells the ActionScript compiler that the number is a hexadecimal value.
Description
Method; specifies an RGB color for an instance of the Color object. Calling this method overrides any previous settings by the setTransform
method.
Returns
Nothing.
Example
This example sets the RGB color value for the movie clip myMovie
. To see this code work, place a movie clip on the Stage with the instance name, myMovie
. Then place the following code on Frame 1 in the main Timeline and choose Control > Test Movie.
myColor = new Color(myMovie);
myColor.setRGB(0x993366);
See also
![]() ![]() ![]() |