setRGB (Color.setRGB method)
public setRGB(offset:Number) : Void
Deprecated since Flash Player 8. The Color class has been deprecated in favor of the
flash.geom.ColorTransform class.
Specifies an RGB color for a Color object. Calling this method overrides any previous
Color.setTransform()
Availability: ActionScript 1.0; Flash Player 5
Parameters
-
offset:Number
0xRRGGBB
consist of two hexadecimal digits that specify the offset of each color component. The
the ActionScript compiler that the number is a hexadecimal value.
Example
This example sets the RGB color value for the movie clip
a movie clip on the Stage with the instance name
Frame 1 in the main Timeline and select Control > Test Movie:
var my_color:Color = new Color(my_mc);
my_color.setRGB(0xFF0000); // my_mc turns red
See also
setTransform (Color.setTransform method)
setTransform (Color.setTransform method)
public setTransform(transformObject:Object) : Void
Deprecated since Flash Player 8. The Color class has been deprecated in favor of the
flash.geom.ColorTransform class.
Sets color transform information for a Color object. The
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
settings.
The hexadecimal or RGB color to be set.
new Object
. To see this code work, place
my_mc
. Then place the following code on
my_mc
,
rgb (ColorTransform.rgb property)
colorTransformObject
constructor. It has parameters
,
, and
each
RR
GG
BB
tells
0x
parameter
Color
421
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?