topical media & game development
mashup-rmx-05-AccordionExample-AccordionExample.mx
mashup-rmx-05-AccordionExample-AccordionExample.mx
[swf]
flex
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
creationComplete="init()"
xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="400">
style(s)
<mx:Style>
.myHeaderStyle
{
upSkin: Embed("mashup-rmx-05-AccordionExample-images-upskin.jpg");
downSkin: Embed("mashup-rmx-05-AccordionExample-images-downskin.jpg");
overSkin: Embed("mashup-rmx-05-AccordionExample-images-overskin.jpg");
selectedUpSkin: Embed("mashup-rmx-05-AccordionExample-images-selectedupskin.jpg");
selectedDownSkin: Embed("mashup-rmx-05-AccordionExample-images-selecteddownskin.jpg");
selectedOverSkin: Embed("mashup-rmx-05-AccordionExample-images-selectedoverskin.jpg");
}
</mx:Style>
script(s)
<mx:Script>
<![CDATA[
import mx.controls.Button;
private function init():void
{
var totalPanes:Array = this.myAccordion.getChildren();
for (var i:uint; i < totalPanes.length; i++)
{
var header:Button = this.myAccordion.getHeaderAt(i) as Button;
header.buttonMode = true;
}
}
]]>
</mx:Script>
accordeon(s)
<mx:Accordion
id="myAccordion"
width="100%" height="100%"
headerStyleName="myHeaderStyle">
<mx:Canvas label="My First Pane">
<mx:Text text="Hello world!" fontSize="16"/>
</mx:Canvas>
<mx:Canvas label="My Second Pane">
<mx:Text text="Hello world!" fontSize="16"/>
</mx:Canvas>
</mx:Accordion>
</mx:Application>
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.