Just have your code set currentState = "stateName", where stateName =
the name of the State.
<mx:Application
   xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> "
   xmlns="*"
   layout="absolute"
   currentState="loginState">     <mx:Script>
     <![CDATA[
       import stuff here...         private function logMeIn():void {
Check login here...
         currentState = "mainApplication";
       }
     ]]>   </mx:Script>          <mx:states>
     <mx:State name="loginState">
       <mx:AddChild position="lastChild">
         <mx:Panel title="Login">
           Login stuff here...           <mx:Button label="Login"
click="logMeIn()"/>         </mx:Panel>       </mx:AddChild>    
</mx:State>     <mx:State name="mainApplication">       <mx:AddChild
position="lastChild">         Your application stuff here for other
state       </mx:AddChild>     </mx:State>   </mx:states>
</mx:Application>     HTH, ~randy


--- In [email protected], "Phill B" <[EMAIL PROTECTED]> wrote:
>
> I have a component that has a MenuBar in it. When the user clicks a
> menu item, I want to change the state in the main app. I cant seam to
> figure out how to do this. I'm guessing that the event isn't being
> sent up to the top level app. So, how do I make the top level app
> aware of the event?
>
> Thanks
>
> --
> Phil
>


Reply via email to