Flex4 Application state in a custom component
Posted
by itarato
on Stack Overflow
See other posts from Stack Overflow
or by itarato
Published on 2010-06-17T18:16:34Z
Indexed on
2010/06/18
7:03 UTC
Read the original article
Hit count: 308
Hi, I'm porting my Flex3 app to Flex4 (FlashBuilder4). I get the whole new state concept, except one thing. In a custom component (separate mxml file) I'm using the main level Application's state. In Flex3 it was:
<mx:State name="only_view_mode">
<mx:RemoveChild target="{myComponent.button1}" />
</mx:State>
In Flex4 it should be something like that:
<mx:State name="only_view_mode" />
and
<mx:LinkButton id="button1" excludeFrom="???" />
My question is: how can I access to an Application state from a component? I checked the official reference (http://www.adobe.com/go/learn_flex4_alldocumentation_en) and Google of course but without any success.
Thanks in advance
© Stack Overflow or respective owner