add (Point.add method)

public add(v:Point) : Point

Adds the coordinates of another point to 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 added.

Returns

flash.geom.Point - The new point.

Example

The following example creates a Point object resultPoint by adding point_2 to 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.add(point_2);
trace(resultPoint.toString()); // (x=5, y=10)

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/00002594.html