User Guide
Customizing the Accordion component (Flash Professional only) 45
_global.skinRegistry["AccordionHeaderSkin"] = true;
return true;
}
static var classConstructed_bl:Boolean = classConstruct();
static var UIObjectExtensionsDependency_obj:Object =
UIObjectExtensions;
}
This class creates a square box based on the border style: a blue box for the false up,
rollover, and disabled states; a green box for the normal pressed state; and a red box for the
expanded child.
3. Save the file.
4. Create a new FLA file and save it in the same folder as the AS file.
5. Create a new symbol by selecting Insert > New Symbol.
6. Set the name to AccordionHeaderSkin.
7. If the advanced view is not displayed, click the Advanced button.
8. Select Export for ActionScript.
The identifier is automatically filled out with
AccordionHeaderSkin.
9. Set the AS 2.0 class to RedGreenBlueHeader.
10. Make sure that Export in First Frame is already selected, and click OK.
11. In Scene 1, drag an Accordion component to the Stage.
12. Set the Accordion properties so that they display several children.
For example, set the
childLabels to an array of [One,Two,Three] and childNames to
an array of
[one,two,three].
13. Select Control > Test Movie.
Using movie clips to customize the Accordion header skin
The example above demonstrates how to use an ActionScript 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.