edit: not the best implementation. there are other better ways to handle movement :(
Quick and dirty rundown of 2d movement. Sorry if it wont make sense.
Given: target point T, staring/object’s current Point S, distance move per update D, object moves at a constant pace.
Task: re-set object’s location every frame/screen update to show movement
Method I – Use polar coordinates
A) determine the angle using trig functions on the right triangle with hypotenuse TS
B) convert angle to radians
C) use the following code to update the object’s location
var translate:Point = Point.polar(distance, angle);
myObj.x += translate.x;
myObj.y += translate.y;
Method II – use Cartesian coordinates
A) determine the angle using trig functions on the right triangle with hypotenuse TS
B) form a new right triangle with hypotenuse of length D, using T as one endpoint, and Q as the other
C) determine x and y for Q using trig functions
D) assign the objects x and y to that of pt. Q’s x and y
actual code to follow (when i dont feel too lazy XD )