Flash CS3 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:Point - The point to be subtracted.
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)
Flash CS3