ActionScript 2.0 Components Language Reference |
|
|
|
| Accordion component > Customizing the Accordion component > Using skins with the Accordion component > Using movie clips to customize the Accordion header skin | |||
The example above demonstrates how to use an ActionScript 2.0 class to customize the Accordion header skin, which is the method used by the skins provided in both the Halo and Sample themes. However, because the example uses simple colored boxes, it is simpler in this case to use different movie clip symbols as header skins.
To create movie clip symbols for Accordion header skins:RedAccordionHeaderSkin.The identifier is automatically filled out with RedAccordionHeaderSkin.
The ActionScript code sizes the skin as needed.
For example, set childLabels to an array of [One,Two,Three] and childNames to an array of [one,two,three].
onClipEvent(initialize) {
falseUpSkin = "RedAccordionHeaderSkin";
falseDownSkin = "GreenAccordionHeaderSkin";
falseOverSkin = "RedAccordionHeaderSkin";
falseDisabled = "RedAccordionHeaderSkin";
trueUpSkin = "BlueAccordionHeaderSkin";
trueDownSkin = "BlueAccordionHeaderSkin";
trueOverSkin = "BlueAccordionHeaderSkin";
trueDisabledSkin = "BlueAccordionHeaderSkin";
}
|
|
|
|