//两点间距离 function getDist(px1, py1, px2, py2) { var vx=px2-px1; var vy=py2-py1; var hyp=Math.sqrt(Math.pow(vx,2)+Math.pow(vy,2)); return hyp; } var long:Number=getDist(0,0,100,100) trace(long)