<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://ns.adobe.com/mxml/2009"
xmlns:mx="library:adobe/flex/halo"
layout="flex.layout.BasicLayout"
viewSourceURL="srcview/index.html">
<Declarations>
<AnimateProperties id="animateProps"
easingFunction="Elastic.easeOut"
duration="4000">
<propertyValuesList>
<PropertyValuesHolder property="rotationY"
values="[0, 360]" />
</propertyValuesList>
</AnimateProperties>
</Declarations>
<Script>
import mx.effects.easing.*;
private function animateRotationY():void {
animateProps.stop();
animateProps.play([img]);
}
</Script>
<Button label="Rotate y-axis"
top="10"
left="10"
click="animateRotationY();" />
<mx:Image id="img"
source="@Embed('Fx.png')"
width="100"
height="100"
horizontalCenter="0"
verticalCenter="0" />
</Application>