I had a quick game, here is what I came up with:
In my example, there is a MovieClip on the stage called "ball", as well as several other MovieClip that are scattered around, for use as dropTargets.
ball.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
stage.addEventListener(MouseEvent.MOUSE_UP, dropIt);
function pickUp(event:MouseEvent):void
{
var ballPoint:Point = ball.parent.localToGlobal( new Point(ball.x, ball.y) );
ball.parent.removeChild(ball);
addChild(ball);
ball.x = ballPoint.x;
ball.y = ballPoint.y;
ball.startDrag();
}
function dropIt(event:MouseEvent):void
{
ball.stopDrag();
if(!event.target.dropTarget) { return };
var dropT:MovieClip = event.target.dropTarget.parent;
var ballPoint:Point = dropT.globalToLocal( new Point(ball.x, ball.y) );
ball.parent.removeChild(ball);
dropT.addChild(ball);
ball.x = ballPoint.x;
ball.y = ballPoint.y;
}
, PickUp "" MovieClip DisplayObject. , , dropTarget (dropTarget ). x/y ( localToGlobal) . .
dropIt stopDrag, , dropTarget. x/y globalToLocal , -. (dropTarget). .
, .
... , , , dropShadow dropTargets . , , , .