I have a simple State change that changes the width of my AIR window:
<mx:states>
<mx:State name="fullWidth">
<mx:SetProperty target="{this}" name="width"
value="{areaRect.width}" />
</mx:State>
And I have a button that toggles it like this:
private function toggleWidth(e:Event):void{
if (currentState=='' ||
currentState==null){
currentState='fullWidth';
} else {
currentState='';
}
}
The problem I'm having is when currentState goes back to empty, the
width does not toggle back to the starting width. I'd rather not
have to create a second state just for returning a property to its
default state. Has anyone else encountered this?
I think it is because the width is normally set on the nativeWindow,
but you can't address nativeWindow from a state.
Thanks;
Amy