Returns
Nothing.
Example
This example sets the RGB color value for the movie clip
movie clip on the Stage with the instance name
in the main Timeline and choose Control > Test Movie.
my_color = new Color(my_mc);
my_color.setRGB(0x993366);
See also
Color.setTransform()
Color.setTransform()
Availability
Flash Player 5.
Usage
my_color.setTransform(colorTransformObject)
Parameters
colorTransformObject
the
Object class
,
,
,
,
ga
gb
ba
bb
Returns
Nothing.
Description
Method; sets color transform information for a Color object. The
parameter is a generic object that you create from the
specifying the percentage and offset values for the red, green, blue, and alpha (transparency)
components of a color, entered in the format 0xRRGGBBAA.
The parameters for a color transform object correspond to the settings in the Advanced Effect
dialog box and are defined as follows:
•
is the percentage for the red component (-100 to 100).
ra
•
is the offset for the red component (-255 to 255).
rb
•
is the percentage for the green component (-100 to 100).
ga
•
is the offset for the green component (-255 to 255).
gb
•
is the percentage for the blue component (-100 to 100).
ba
•
is the offset for the blue component (-255 to 255).
bb
•
is the percentage for alpha (-100 to 100).
aa
•
is the offset for alpha (-255 to 255).
ab
334
Chapter 12: ActionScript Dictionary
An object created with the
must have the following properties that specify color transform values:
,
. These properties are explained below.
aa
ab
. To see this code work, place a
my_mc
. Then place the following code on Frame 1
my_mc
constructor. This instance of
new Object
colorTransformObject
constructor. It has parameters
new Object
,
,
ra
rb
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?