334
Chapter 12: ActionScript Dictionary
Returns
Nothing.
Example
This example sets the RGB color value for the movie clip
my_mc
. To see this code work, place a
movie clip on the Stage with the instance name
my_mc
. Then place the following code on Frame 1
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
An object created with the
new Object
constructor. This instance of
the
Object class
must have the following properties that specify color transform values:
ra
,
rb
,
ga
,
gb
,
ba
,
bb
,
aa
,
ab
. These properties are explained below.
Returns
Nothing.
Description
Method; sets color transform information for a Color object. The
colorTransformObject
parameter is a generic object that you create from the
new Object
constructor. It has parameters
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:
•
ra
is the percentage for the red component (-100 to 100).
•
rb
is the offset for the red component (-255 to 255).
•
ga
is the percentage for the green component (-100 to 100).
•
gb
is the offset for the green component (-255 to 255).
•
ba
is the percentage for the blue component (-100 to 100).
•
bb
is the offset for the blue component (-255 to 255).
•
aa
is the percentage for alpha (-100 to 100).
•
ab
is the offset for alpha (-255 to 255).
Содержание FLASH MX 2004 - ACTIONSCRIPT
Страница 1: ...ActionScript Reference Guide...
Страница 8: ...8 Contents...
Страница 12: ......
Страница 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Страница 54: ...54 Chapter 2 ActionScript Basics...
Страница 80: ...80 Chapter 3 Writing and Debugging Scripts...
Страница 82: ......
Страница 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Страница 112: ......
Страница 120: ...120 Chapter 6 Using the Built In Classes...
Страница 176: ......
Страница 192: ...192 Chapter 10 Working with External Data...
Страница 202: ...202 Chapter 11 Working with External Media...
Страница 204: ......
Страница 782: ...782 Chapter 12 ActionScript Dictionary...
Страница 793: ...Other keys 793 221 222 Key Key code...
Страница 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Страница 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Страница 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Страница 816: ...816 Index...