If the style is one of the inheriting styles, Flash looks through the parent hierarchy for an
4.
inherited value.
Flash looks for the style in the global style declaration.
5.
If the property is still not defined, the property has the value
6.
About color style properties
Color style properties behave differently than noncolor properties. All color properties have a
name that ends in "Color"—for example,
color style properties are changed, the color is immediately changed on the instance and in all of
the appropriate child instances. All other style property changes simply mark the object as
needing to be redrawn, and changes don't occur until the next frame.
The value of a color style property can be a number, a string, or an object. If it is a number, it
represents the RGB value of the color as a hexadecimal number (0xRRGGBB). If the value is a
string, it must be a color name.
Color names are strings that map to commonly used colors. You can add new color names by
using the Style Manager (see
default color names:
Color name
black
white
red
green
blue
magenta
yellow
cyan
haloGreen
haloBlue
haloOrange
Note: If the color name is not defined, the component may not draw correctly.
You can use any valid ActionScript identifier to create your own color names (for example,
or
"WindowText"
mx.styles.StyleManager.registerColorName("special_blue", 0x0066ff);
Most components cannot handle an object as a color style property value. However, certain
components can handle color objects that represent gradients or other color combinations. For
more information, see the "Using styles" section of each component's entry in
"Components Dictionary."
74
Chapter 5: Customizing Components
"StyleManager class" on page
. Use the Style Manager to define new colors, as shown here:
"ButtonText")
,
backgroundColor
disabledColor
721). The following table lists the
Value
0x000000
0xFFFFFF
0xFF0000
0x00FF00
0x0000FF
0xFF00FF
0xFFFF00
0x00FFFF
0x80FF4D
0x2BF5F5
0xFFC200
.
undefined
, and
color
Chapter 6,
. When
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?