Offset (Point.offset Method); Point Constructor - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

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
value of x to create the new x value. The value of
the new y value.
Availability: ActionScript 1.0; Flash Player 8
Parameters
- The amount by which to offset the horizontal coordinate, x.
dx:Number
- The amount by which to offset the vertical coordinate, y.
dy:Number
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
- The horizontal coordinate. The default value is 0.
x:Number
- The vertical coordinate. The default value is 0.
y:Number
is added to the original
dx
is added to the original value of y to create
dy
Point (flash.geom.Point)
1015

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF