Register an event listener in MXML for Accordion change event
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="300" height="280"> <mx:Script> import mx.controls.Alert; private function handleAccChange():void { Alert.show("You just changed views"); } </mx:Script> <mx:Accordion id="myAcc" height="60" width="200" change="handleAccChange();"> <mx:HBox label="Box 1"> <mx:Label text="Put Some Stuff Here" /> </mx:HBox> <mx:HBox label="Box 2"> <mx:Label text="Put Different Stuff Here" /> </mx:HBox> </mx:Accordion> </mx:Application>