Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > Point (flash.geom.Point) > 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
dx:Number - The amount by which to offset the horizontal coordinate, x.
dy:Number - The amount by which to offset the vertical coordinate, y.
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)
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/00002601.html