Hello, I am having trouble accessing states in a module.
Knowing that my application would grow, I have started to modularise right away. For a simpel case, let us take the example from this website:
We have the Main.mxml and two mxml files (MainView and LoginView).
0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:view="view.*"> <mx:TabNavigator> <view:LoginView /> <view:MainView /> </mx:TabNavigator></mx:Application>
Now, assume that have a state named StateB in MainView, and a button in LoginView. When I click on the button in LoginView, I was StateB in Mainview to open. How do I do that?
This is the snippet from LoginView:
protected function addBtn_clickHandler(event:MouseEvent):void
currentState = "StateB";
Thank you very much.
Retrieving data ...