I have a Spark Button and have tried to set it as selected like in Halo. It does not have a selected property so I tried to set the state using the following MXML:
<s:Button label="Hello World" currentState="over" />
This blows up when run with the error :
ArgumentError: Undefined state 'over'.
But a Button does have an over state! Is my thinking incorrect?
Thanks again James
The Spark button in this case is not itself toggleable. You will need to use a ToggleButton. Spark controls are not the swiss army knives that Flex 3 components were (in order to keep things a bit lighter).
The new Spark skinnable components control their own state internally and the components themselves in turn set the currentState of their associated skin at runtime. The current state of the component is not (in general) directly controllable via 'currentState'.
I was just looking at the other components and must have missed ToggleButton, I'm getting there!