Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.
1 2 3 4 5
function distance(x1, y1, x2, y2){ var dx = x2 - x1; var dy = y2 - y1; return Math.sqrt(dx*dx + dy*dy); }