The "states" are a nice thing in flex, but I miss 1 CRUCIAL thing:
How do you define the a constant that needs to be different in two states?
It no problem to set the left.somestate on a button for example but I would like to define a constant different for two states e.g:
const SomeNumber.StateA:Number = 4;
const SomeNumber.StateB:Number = 7;
The new . syntax is only available in MXML. Sounds like you are looking for how to implement states in ActionScript, you might find this blog post useful: http://blogs.adobe.com/flexdoc/2010/08/creating-flex-view-states-in-actionscript.html
Or maybe you could move your object into MXML?
<fx:Object id="someNumber value.stateA="4" value.stateB="7" />