User Guide
102 Chapter 6: Components Dictionary
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 to determine the state. The following table shows the
border style that is set for each skin:
To create an ActionScript customized Accordion header skin:
1.
Create a new ActionScript class file.
For this example, name the file RedGreenBlueHeader.as.
2.
Copy the following ActionScript to the file:
import mx.skins.RectBorder;
import mx.core.ext.UIObjectExtensions;
class RedGreenBlueHeader extends RectBorder
{
static var symbolName:String = "RedGreenBlueHeader";
static var symbolOwner:Object = RedGreenBlueHeader;
function size():Void
{
var c:Number; // color
var borderStyle:String = getStyle("borderStyle");
switch (borderStyle) {
case "falseup":
case "falserollover":
case "falsedisabled":
c = 0x7777FF;
break;
case "falsedown":
c = 0x77FF77;
break;
case "trueup":
case "truedown":
case "truerollover":
case "truedisabled":
c = 0xFF7777;
break;
}
Property Border style
falseUpSkin falseup
falseDownSkin falsedown
falseOverSkin falserollover
falseDisabled falsedisabled
trueUpSkin trueup
trueDownSkin truedown
trueOverSkin truerollover
trueDisabledSkin truedisabled