Accessing ViewStack index with actionScript

Hello,

I am trying to show the second index of my ViewStack via ActionScript. Basically a user logs in in the first index and will be “redirected” (for lack of a better word) to the second index of the VewStack. Currently I am just showing a different state (I have attached the code).

Thanks for any help


if(evt.result.loginsuccess == "yes")	
			{	
				currentState = "Logged In";
				
			}