멀티터치 드래그 입니다.
멀티터치 드래그 소스입니다.
마치 무비클립의 드래그 드롭과 같습니다.
/* Touch and Drag Event
Allows the object to be moved by holding and dragging the object.
*/
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
mc.addEventListener(TouchEvent.TOUCH_BEGIN, touchBegin_2);
mc.addEventListener(TouchEvent.TOUCH_END, touchEnd_2);
var fl_DragBounds_2:Rectangle = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight);
function touchBegin_2(event:TouchEvent):void
{
event.target.startTouchDrag(event.touchPointID, false, fl_DragBounds_2);
}
function touchEnd_2(event:TouchEvent):void
{
event.target.stopTouchDrag(event.touchPointID);
}
/* Touch and Drag Event
Allows the object to be moved by holding and dragging the object.
*/
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
mc.addEventListener(TouchEvent.TOUCH_BEGIN, fl_TouchBeginHandler_3);
mc.addEventListener(TouchEvent.TOUCH_END, fl_TouchEndHandler_3);
var fl_DragBounds_3:Rectangle = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight);
function fl_TouchBeginHandler_3(event:TouchEvent):void
{
event.target.startTouchDrag(event.touchPointID, false, fl_DragBounds_3);
}
function fl_TouchEndHandler_3(event:TouchEvent):void
{
event.target.stopTouchDrag(event.touchPointID);
}