<?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="450" height="150">
<fx:Declarations>
<s:Animate id="mover" target="{button}">
<s:SimpleMotionPath property="x" valueFrom="0" valueTo="100"/>
<s:SimpleMotionPath property="y" valueTo="100"/>
<s:SimpleMotionPath property="width" valueBy="100"/>
</s:Animate>
</fx:Declarations>
<s:states>
<s:State name="s1"/>
<s:State name="s2"/>
</s:states>
<s:transitions>
<s:Transition>
<s:Animate target="{button1}">
<s:SimpleMotionPath property="x"/>
<s:SimpleMotionPath property="y"/>
<s:SimpleMotionPath property="width"/>
</s:Animate>
</s:Transition>
</s:transitions>
<s:Button id="button" label="Animate Me" click="mover.play()"/>
<s:Button id="button1" label="Transition Me"
x="200" x.s2="300" y="0" y.s2="100" width.s2="150"
click="currentState = (currentState == 's1') ? 's2' : 's1'"/>
</s:Application>