1 Reply Latest reply: Mar 21, 2010 8:22 PM by FTQuest RSS

    How do I call a state change from within a view

    Matt_Voerman Community Member

      Hey guys,

      I think I might understand how to do this, but I wanted to run it by the forums to see if I understand it correctly..


      So I have a base view (base.mxml) which contains 3 separate 'state' view components - like thus...


              <s:State name="MinimisedState" />
              <s:State name="MaximisedState" />
              <s:State name="LoginState" />
      <view:MinimisedView includeIn="MinimisedState" width="100%" height="100%" />

      <view:MaximisedView includeIn="MaximisedState" width="100%" height="100%" />
      <view:LoginPane includeIn="LoginState" width="100%" height="100%" />


      Apologies if this sounds like a gumby question, but how do I get the LoginPane state/view (to dispatch an event) to tell the base view (container) to change states? Say to MinimisedState or MaxmisedState.


      I'm sure this is something really simple, and I don't have a problem doing this when all the states are registered/contained within the same base MXML file - but when it comes to passing events up to the parent (from seperate external mxml views/components) i'm a little confused.


      Any help appreciated