Well, I played around with it briefly this evening and it seems that you can get individual accordion headings using the accordion class'sGetheaderat ()
Method, then it is just a matter of saving that reference in a variable, or applying a style directly to the returned button reference.
The example itself is pretty simple, but I'm sure the same principles apply to other styles as well
<? XML version = "1.0" encoding = "UTF-8" ?>
<! -- Http://blog.flexexamples.com/2007/10/30/setting-styles-on-individual-flex-accordion-headers/ -->
< MX: Application Xmlns: MX = "Http://www.adobe.com/2006/mxml"
Layout = "Vertical"
Verticalalign = "Middle"
Backgroundcolor = "White" >
< MX: Style >
Accordionheader {
Fillcolors: black, black;
Fillalphas: 1, 1;
Textrolovercolor: white;
Textselectedcolor: white;
Themecolor: black;
}
</ MX: Style >
< MX: script >
<! [CDATA [
Private function Init (): void {
Accordion. getheaderat (0). setstyle ("color", "Red ");
Accordion. getheaderat (1). setstyle ("color", "haloorange ");
Accordion. getheaderat (2). setstyle ("color", "yellow ");
Accordion. getheaderat (3). setstyle ("color", "halogreen ");
Accordion. getheaderat (4). setstyle ("color", "haloblue ");
}
]>
</ MX: script >
< MX: accordion ID = "Accordion"
Width = "300"
Height = "200"
Creationcomplete = "Init ();" >
< MX: vbox Label = "Red" />
< MX: vbox Label = "Orange" />
< MX: vbox Label = "Yellow" />
< MX: vbox Label = "Green" />
< MX: vbox Label = "Blue" />
</ MX: accordion >
</MX: Application>