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:states>
<s:State name="MinimisedState" />
<s:State name="MaximisedState" />
<s:State name="LoginState" />
</s:states>
<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
If I understood your question correctly, there is a tutorial on that in 'Flex in a Week' :
http://www.adobe.com/devnet/flex/videotraining/flex4beta/index.html
It covers dispatching events from custom component to main application.
HTH
FTQuest