Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > Point (flash.geom.Point) > subtract (Point.subtract method) | |||
public subtract(v:Point) : Point
Subtracts the coordinates of another point from the coordinates of this point to create a new point.
Availability: ActionScript 1.0; Flash Player 8
v:flash.geom.Point - The point to be subtracted.
flash.geom.Point - The new point.
The following example creates point_3 by subtracting point_2 from point_1.
import flash.geom.Point; var point_1:Point = new Point(4, 8); var point_2:Point = new Point(1, 2); var resultPoint:Point = point_1.subtract(point_2); trace(resultPoint.toString()); // (x=3, y=6)
Version 8
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00002604.html