tags:

views:

118

answers:

1

Hi,

I have a component mxml in which i have a save button, on click of the save button i need to display another component which will be in a tab navigator, for this I am using the view stack. My problem is, on click of save I need to display the second tab instead of the first tab, but defaultly the first tab will be displayed.

How could this be accomplished?

Thanks!

cheers,

Deena

A: 

I 'll put a sample code piece on what my requirement was and how i did it.

In my main mxml i have a view stack

Now say i completed successful login I need to be taken to screen one, My screen {which is a component mxml}. My screen contains a tab navigator and the requirement is i need to be taken to the second tab. So what i do is in the creation complete of my screen1 component i set the selectedIndex of my tab navigator to 1. and hurray! this solves the problem

private function ():void { id_tabNavigator.selectedIndex = 1;

}

Deena