Responding to tab changes in a tab navigator
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="white"> <mx:Script> import mx.controls.Alert; private function handleChange():void { Alert.show(myTabNav.selectedIndex + " Label: " + myTabNav.selectedChild.label); } </mx:Script> <mx:TabNavigator width="200" height="100" id="myTabNav" change="handleChange()"> <mx:Canvas label="Tab 1" /> <mx:VBox label="Tab 2" /> <mx:HBox label="Tab 3" /> </mx:TabNavigator> </mx:Application>