User Guide
Point (flash.geom.Point) 1015
See also
length (Point.length property)
offset (Point.offset method)
public offset(dx:Number, dy:Number) : Void
Offsets the Point object by the specified amount. The value of dx is added to the original
value of x to create the new x value. The value of
dy is added to the original value of y to create
the new y value.
Availability: ActionScript 1.0; Flash Player 8
Parameters
dx:Number - The amount by which to offset the horizontal coordinate, x.
dy:Number - The amount by which to offset the vertical coordinate, y.
Example
The following example offsets a point's position by specified x and y amounts.
import flash.geom.Point;
var myPoint:Point = new Point(1, 2);
trace(myPoint.toString()); // (x=1, y=2)
myPoint.offset(4, 8);
trace(myPoint.toString()); // (x=5, y=10)
See also
add (Point.add method)
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
Parameters
x:Number - The horizontal coordinate. The default value is 0.
y:Number - The vertical coordinate. The default value is 0.