2 Replies Latest reply on Jan 24, 2008 7:03 AM by yevster

    States and Events

    yevster
      Hi.
      I can not figure out how to pass data from one component to the next in a program with states.

      Consider, a login screen that generates an event with User information.
      A state changes from Login screen to main application screen. But how do i pass the User information into the main app?

      Here is a snippet of my code:

      <mx:states>
      <mx:State name="main_app">
      <mx:RemoveChild target="{login1}" />
      <mx:AddChild relativeTo="{thePage}" position="lastChild" creationPolicy="all">
      <views:SO_OnlineComponent id="soComponent"/>
      </mx:AddChild>

      </mx:State>
      </mx:states>

      <mx:HBox id="thePage" width="100%" height="100%">
      <views:Login id="login1" loginProcessed="currentState='main_app'"/> <!-- this is the event with data i need to propagate -->
      </mx:HBox>