이미지 혹은 Panel 등등을 회전시키거나 책넘기기등등.. 여러가지 Effect 를 사용할 수 있습니다.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:distortion="view.distortion.*"
xmlns:sides="view.sides.*"
creationComplete="init();">
<mx:Script>
<![CDATA[
import com.adobe.ac.mxeffects.*;
import com.adobe.ac.util.*;
import com.adobe.ac.controls.*;
/*
몇가지 종류가 있으니 골라잡아서 이름만 샥샥 바꾸면 됩니다..
Flip, CubeRotate, Push, Pop, Door, Gate
*/
private function EffectTest( Cnt:int ) : void
{
var i:int;
var e:CubeRotate = new CubeRotate( img );
e.siblings= [ img ];
e.direction= DistortionConstants.TOP;
e.smooth= false;
e.duration = 500;
e.distortion= 25;
// 몇번 돌릴거지?
if ( Cnt > 1 )
{
for ( i=1; i<=Cnt; i++ )
{
e.play();
}
LoginResize2.play();
LoginResize2.stop();
LoginResize.play();
}
else { e.play(); }
}
// Effect 처리 두번째부분(e:이펙트명)
private function EffectTest2() : void
{
var i:int;
var e:Pop = new Pop( img ); // 이부분만 바꾸면 바로 적용됨
e.siblings= [ img ];
e.direction= DistortionConstants.TOP;
e.smooth= false;
e.duration = 500; // 시간조절
e.distortion= 25;
e.play(); // 실행(밑에 정의했음)
}
private var s:uint = 2;
// 시작시 발생하는 이벤트
private function init():void
{
img.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function enterFrameHandler(e:Event):void
{
if(img.x < 0) img.x += (0-img.x)/s;
if(img.y < 0) img.y += (0-img.y)/s;
if(img.x+img.width > pn.width) img.x += (pn.width-img.width-img.x)/s;
if(img.y+img.height > pn.height) img.y += (pn.height-img.height-img.y)/s;
}
// 마우스 클릭시 드래그 시작
private function mouseDownHandler(e:MouseEvent):void
{
img.startDrag();
}
// 드래그 종료
private function mouseUpHandler(e:MouseEvent):void
{
img.stopDrag();
}
]]>
</mx:Script>
<!-- Effect 처리 부분 -->
<mx:Resize id="LoginResize" target="{img}" widthTo="400" heightTo="400"/>
<mx:Resize id="LoginResize2" target="{img}" widthTo="200" heightTo="200"/>
<mx:Panel id="pn" title="꿈꾸던 그것-이미지 드래그 가능" width="500" height="500"
paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10" fontFamily="맑은고딕" fontSize="12" fontWeight="normal">
<mx:HBox width="100%" height="100%" horizontalAlign="center" verticalAlign="middle">
<mx:Image id="img" width="200" height="200" source="1.jpg"
mouseDown="mouseDownHandler(event)"
mouseUp="mouseUpHandler(event)" />
</mx:HBox>
<mx:ControlBar>
<mx:Button label="땡겨" click="LoginResize.end(); LoginResize.play();"/>
<mx:Button label="놔" click="LoginResize2.end(); LoginResize2.play();"/>
<mx:Button label="돌리" click="EffectTest(0);"/>
<mx:Button label="돌리면서 땡겨" click="EffectTest(3);"/>
<mx:Button label="버려" click="EffectTest2();"/>
</mx:ControlBar>
</mx:Panel>
</mx:Application>