Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.
1 2 3 4 5 6
function angleBetween(x1, y1, x2, y2){ var dx = x2 - x1; var dx = y2 - y1; // value in radians; multiply by (180/Math.PI) for degrees return Math.atan2(dy, dx); }