Set Rotate effect target, origin position
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
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:VBox id="vbox" x="400" y="400" clipContent="false">
<mx:TextInput id="textInput1" creationComplete="applyEffect(event)" />
</mx:VBox>
</mx:Application>
Related examples in the same category