<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
viewSourceURL="srcview/index.html"
width="300" height="250">
<s:states>
<s:State name="s1"/>
<s:State name="s2"/>
</s:states>
<s:transitions>
<s:Transition fromState="s1" toState="s2" autoReverse="true">
<s:Move target="{button}" startDelay="250" duration="1000"/>
</s:Transition>
<s:Transition fromState="s2" toState="s1" autoReverse="true">
<s:Sequence target="{button}">
<s:Move duration="1000"/>
<s:Pause duration="250"/>
</s:Sequence>
</s:Transition>
</s:transitions>
<s:Button label="Run Transition"
click="currentState = (currentState=='s1')?'s2':'s1'"/>
<s:Button id="button" x="50" y="50" x.s2="200" y.s2="200"/>
</s:Application>