Flash CS3 Documentation |
|||
| Extending Flash > Objects > Math object > Math.pointDistance() | |||
Flash MX 2004.
Math.pointDistance(pt1,pt2)
pt1 and pt2 Specify the points between which distance is measured.
A floating-point value that represents the distance between the points.
Method; computes the distance between two points.
The following example stores the value for the distance between pt1 and pt2 in the dist variable:
var pt1 = {x:10, y:20}
var pt2 = {x:100, y:200}
var dist = fl.Math.pointDistance(pt1, pt2);
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00004293.html