offsetPoint (Rectangle.offsetPoint method)

public offsetPoint(pt:Point) : Void

Adjusts the location of the Rectangle object using a Point object as a parameter. This method is similar to the Rectangle.offset() method, except that it takes a Point object as a parameter.

Availability: ActionScript 1.0; Flash Player 8

Parameters

pt:Point - A Point object to use to offset this Rectangle object.

Example

The following example offsets a Rectangle by using the values found in a point.

import flash.geom.Rectangle;
import flash.geom.Point;
    
var rect:Rectangle = new Rectangle(1, 2, 4, 8);
trace(rect.toString()); // (x=1, y=2, w=4, h=8)

var myPoint:Point = new Point(16, 32);
rect.offsetPoint(myPoint);
trace(rect.toString()); // (x=17, y=34, w=4, h=8)

See also

Point (flash.geom.Point)


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00002091.html