views:

207

answers:

1

A short question:

I've got a TabNavigator with multiple canvas children. How can i open one of the children with actions script (imagine it as a tab with an intro and after login the tab with content needs to be opened).

I have tried this.parentDocument.tabs.selectedIndex(1); but that doesnt work.

A: 

First, make sure that all the children are loaded before you try to change the TabNavigator index.

Second, you can do something like this in your "parentDocument":

private function setTabsIndex(tabs:TabNavigator, index:Number) : void {

  tabs.selectedIndex = index;

}
Robusto
Problem with my code was the (1) which had to be = 1! Thanks! I've added creationPolicy="all" to my TabNavigator