blob: c1a95bb621bf00c9fe8721816b152fd9d6ed8a95 [file] [log] [blame]
<s:SkinnableContainer
xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:local="comps.*"
height="250"
width="250"
creationPolicy="none" >
<s:layout>
<s:VerticalLayout/>
</s:layout>
<fx:Script>
<![CDATA[
import mx.events.StateChangeEvent;
public function goToState2():void{
if(currentState == "state2"){
dispatchEvent(new Event("inState2"));
}else{
addEventListener("currentStateChange", handleCurrentStateChange);
currentState = "state2";
}
}
private function handleCurrentStateChange(e:StateChangeEvent):void{
dispatchEvent(new Event("inState2"));
}
]]>
</fx:Script>
<s:states>
<s:State name="state1" />
<s:State name="state2" />
</s:states>
<s:Button id="myButtonA" label="Gumbo Button Default State CP_N" includeIn="state1" />
<s:Button id="myButtonB" label="Gumbo Button State Two CP_N" includeIn="state2" />
</s:SkinnableContainer>