Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > Point (flash.geom.Point) > Point constructor | |||
public Point(x:Number, y:Number)
Creates a new point. If you pass no parameters to this method, a point is created at (0,0).
Availability: ActionScript 1.0; Flash Player 8
x:Number - The horizontal coordinate. The default value is 0.
y:Number - The vertical coordinate. The default value is 0.
The first example creates a Point object point_1 with the default constructor.
import flash.geom.Point; var point_1:Point = new Point(); trace(point_1.x); // 0 trace(point_1.y); // 0
The second example creates a Point object point_2 with the coordinates x = 1 and y = 2.
import flash.geom.Point; var point_2:Point = new Point(1, 2); trace(point_2.x); // 1 trace(point_2.y); // 2
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/00002602.html