Im trying to make a simple object move from its original position to one of the corners in which direction the mouse is being moved. But its a bit trickier, because I need the mouse to travel some distance in one of the directions before moving the object in that corners, in which the mouse is being moved ( to be sure that we didnt accidentally moved the mouse/object ).
I was thinking that I have to save the starting point when the mouse has been pressedDown, and after that to check when it(the mouse) has moved XX pixels in one of the directions and then if moved above some point (in which we are sure that it is not a random movement) move the object to one of the corners. But .... I cant quite figure it out howe to be done by code.
To show more clearly the above Ill explain it with this picture

So the Gray Box is our object.
The Arrows are the directions in which we can move the box.
The Green line is the distance that we need to move our mouse (while it is pressedDown)so the object moves in one of the directions./in this example 50px/
Lets assume we clicked the Grey Box in the upper right corner(where the filled green circle is), so if we want to move the box to the LEFT, we need at least to move the mouse(while it is still pressedDown) to the position where the left hollow green circle is. And if we want to move the object to the RIGHT, we need to move the mouse to the right hollow green circle, before the Grey Box goes in that corner.
The RED and BLUE circles are just different scenarios, representing different points in which we have clicked the BOX and where we need to move the mouse, so the BOX moves.
:) Any help will be very appreciated.
MOUSE_DOWNand listen either onENTER_FRAMEorMOUSE_MOVE(better) and check there if the current mouse position has moved far enough from the mouse down point to be considered a move. - BadFeelingAboutThis