User Guide
136 Chapter 6: Components Dictionary
The default value for all skin properties ending in “Skin” is ButtonSkin, and the default for all
“Icon” properties is
undefined. The properties with the “Skin” suffix provide a background and
border, whereas those with the “Icon” suffix provide a small icon.
In addition to the icon skins, the Button component also supports a standard
icon property. The
difference between the standard property and style property is that through the style property you
can set icons for the individual states, whereas with the standard property only one icon can be set
and it applies to all states. If a Button instance has both the
icon property and icon style
properties set, the instance may not behave as anticipated.
To see an interactive movie demonstrating when each skin is used, see Using Components Help.
Using ActionScript to draw Button skins
The default skins in both the Halo and Sample themes use the same skin element for all states and
draw the actual graphics through ActionScript. The Halo implementation uses an extension of
the RectBorder class and custom drawing API code to draw the states. The Sample
implementation uses the same skin and the same ActionScript class as the Button skin.
To create an ActionScript class to use as the skin and provide different states, the skin can read the
borderStyle style property of the skin and emphasized property of the parent to determine the
state. The following table shows the border style that is set for each skin:
falseDisabledIconEmphasized
The icon disabled state of an emphasized button.
trueUpIconEmphasized
The icon toggled state of an emphasized button.
trueOverIconEmphasized
The icon over-toggled state of an emphasized button.
trueDownIconEmphasized
The icon pressed-toggled state of an emphasized button.
trueDisabledIconEmphasized
The icon disabled-toggled state of an emphasized button.
Property Border style
falseUpSkin falseup
falseDownSkin falsedown
falseOverSkin falserollover
falseDisabled falsedisabled
trueUpSkin trueup
trueDownSkin truedown
trueOverSkin truerollover
trueDisabledSkin truedisabled
Property Description