<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute”>
<mx:Script>
<![CDATA[
private function applyEffect(event:Event):void
{
rotateEffect.target=event.currentTarget;
rotateEffect.originX=event.currentTarget.width/2;
rotateEffect.originY=event.currentTarget.height/2;
rotateEffect.play();
}

]]>
</mx:Script>
<mx:Rotate id=”rotateEffect”>
</mx:Rotate>
<mx:VBox id=”vbox” x=”107″ y=”55″ clipContent=”false”>
<mx:Image id=”img1″ source=”flowers.jpg” creationComplete=”applyEffect(event)”/>
</mx:VBox>
</mx:Application>

Advertisement