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

Parameters

v:flash.geom.Point - The point to be subtracted.

Returns

flash.geom.Point - The new point.

Example

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