Define an event listener for Accordion initialize event
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> import mx.controls.Alert; public function pane2_initialize():void { Alert.show("Pane 2"); } </mx:Script> <mx:Accordion width="200" height="100"> <mx:VBox id="pane1" label="Pane 1"> <mx:Label text="This is pane 1" /> </mx:VBox> <mx:VBox id="pane2" label="Pane 2" initialize="pane2_initialize();"> <mx:Label text="This is pane 2" /> </mx:VBox> </mx:Accordion> </mx:Application>