0

In Flex 4.5 for mobile how can I use portrait / landscape states from a skin file?

e.g. In the skin file I want to create the following states

<s:states>
    <s:State name="portrait" />
    <s:State name="landscape" />
</s:states>

and use them in the normal way. However the current state in the skin file is not updated when I switch between landscape and portrait.

Sam
  • 616
  • 7
  • 19

1 Answers1

0

It's possible to bind to the current state of the host component:

<fx:Binding source="hostComponent.currentState" destination="this.currentState"/>

Also see this for an example:

http://saturnboy.com/2009/09/flex4-component-states-skin-states/
Sam
  • 616
  • 7
  • 19