in my case I click a button. it calls changeTabState() ; it changes the state and then needs to select a tab using selectedIndex. but that does not work properly. If i go back go the main state and click the button again, it works as it should. Help! What should I do register the tab navigator component in my new state?
按钮
<mx:Button x="741" y="21" label="Upload" click="changeTabState( login );" visible="{loggedIn}"/>
功能:
public function changeTabState(tabName):void {
currentState= tools ; //changes my state to tools
trace(tabName);
if (tabName == "login") {
trace(tabName);
toolsTabs.selectedIndex=4;
} else if (tabName == "upload") {
toolsTabs.selectedIndex=3;
}
}