Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mouseMove(event:MouseEvent):void
- {
- var p:Point = new Point(event.localX, event.localY);
- // Convert the coordinate into something we can move
- // easily into another coordinate space
- p = event.target.localToGlobal(p);
- // Convert the the coordinate spaced the dragged object is in
- p = draggedObject.parent.globalToLocal(p);
- draggedObject.x = p.x;
- draggedObject.y = p.y;
- }
Advertisement
Add Comment
Please, Sign In to add comment