Guest User

Untitled

a guest
Feb 12th, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. function mouseMove(event:MouseEvent):void
  2. {
  3. var p:Point = new Point(event.localX, event.localY);
  4.  
  5. // Convert the coordinate into something we can move
  6. // easily into another coordinate space
  7. p = event.target.localToGlobal(p);
  8.  
  9. // Convert the the coordinate spaced the dragged object is in
  10. p = draggedObject.parent.globalToLocal(p);
  11.  
  12. draggedObject.x = p.x;
  13. draggedObject.y = p.y;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment