User Guide
Creating the ActionScript class file 169
The following example shows the skin variables for the various states of the CheckBox
component:
var falseUpSkin:String = "";
var falseDownSkin:String = "";
var falseOverSkin:String = ""
var falseDisabledSkin:String = "";
var trueUpSkin:String = "";
var trueDownSkin:String = "";
var trueOverSkin:String = "";
var trueDisabledSkin:String = "";
var falseUpIcon:String = "CheckFalseUp";
var falseDownIcon:String = "CheckFalseDown";
var falseOverIcon:String = "CheckFalseOver";
var falseDisabledIcon:String = "CheckFalseDisabled";
var trueUpIcon:String = "CheckTrueUp";
var trueDownIcon:String = "CheckTrueDown";
var trueOverIcon:String = "CheckTrueOver";
var trueDisabledIcon:String = "CheckTrueDisabled";
About styles
You can use styles to register all the graphics in your component with a class and let that class
control the color scheme of the graphics at runtime. No special code is necessary in the
component implementations to support styles. Styles are implemented entirely in the base
classes (UIObject and UIComponent) and skins.
To add a new style to a component, call
getStyle("styleName") in the component class. If
the style has been set on an instance, on a custom style sheet, or on the global style sheet, the
value is retrieved. If not, you may need to install a default value for the style on the global
style sheet.
For more information about styles, see “Using styles to customize component color and text”
on page 82.
Registering skins to styles
The following example creates a component called Shape. This component displays a shape
that is one of two skins: a circle or a square. The skins are registered to the
themeColor style.