Mega Code Archive

 
Categories / Flex / Components
 

Accordion container, IndexChangedEvent

<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="300"     height="280">     <mx:Script>                      import mx.events.IndexChangedEvent;             import mx.controls.Alert;             private function handleChange(event:IndexChangedEvent):void {                 var currentIndex:int=event.newIndex;             }                </mx:Script>     <mx:Accordion id="myAcc" height="60" width="200" change="handleChange(event);">         <mx:HBox label="Box 1">             <mx:Label text="A" />         </mx:HBox>         <mx:HBox label="Box 2">             <mx:Label text="B" />         </mx:HBox>     </mx:Accordion> </mx:Application>