Hello communitie
hope anyone can help me.
I have a custom component with a TextInput with a id="userID" assigned.
and i have a Login button with a id="loginBtn" and have <s:Button id="loginBtn" includeIn="Login" x="318" y="237" height="20" label="Login" click="FlexGlobals.topLevelApplication.gotoView();"/>
In the main application i have this
public function gotoView():void {
parentStack.selectedChild.label;
}
<mx:ViewStack id="parentStack" width="1280" height="768">
<s:NavigatorContent width="100%" height="100%" label="Login">
<forms:MainSiteForm horizontalCenter="0" verticalCenter="0">
</forms:MainSiteForm>
</s:NavigatorContent>
<s:NavigatorContent width="100%" height="100%" label="Admin">
<s:ModuleLoader url="views/Administrator.swf"/>
</s:NavigatorContent>
<s:NavigatorContent width="100%" height="100%" label="Sales">
</s:NavigatorContent>
<s:NavigatorContent width="100%" height="100%" label="Designers">
</s:NavigatorContent>
<s:NavigatorContent width="100%" height="100%" label="Retailers">
</s:NavigatorContent>
</mx:ViewStack>
Can someone help me with this please????
example if i type Sales in the TextInput userID and click the Login button i want to switch to that view in the main application.
any help will be really apreciated