Point (flash.geom.Point)


Object
    |
    +-flash.geom.Point

public class Point
extends Object

The Point class represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.

The following code creates a point at (0,0):

var myPoint:Point = new Point();

Availability: ActionScript 1.0; Flash Player 8

Property summary

Modifiers

Property

Description

 

length:Number

The length of the line segment from (0,0) to this point.

 

x:Number

The horizontal coordinate of the point.

 

y:Number

The vertical coordinate of the point.

Properties inherited from class Object

constructor (Object.constructor property), __proto__ (Object.__proto__ property), prototype (Object.prototype property), __resolve (Object.__resolve property)


Constructor summary

Signature

Description

Point(x:Number, y:Number)

Creates a new point.

Method summary

Modifiers

Signature

Description

 

add(v:Point) : Point

Adds the coordinates of another point to the coordinates of this point to create a new point.

 

clone() : Point

Creates a copy of this Point object.

static

distance(pt1:Point, pt2:Point) : Number

Returns the distance between pt1 and pt2.

 

equals(toCompare:Object) : Boolean

Determines whether two points are equal.

static

interpolate(pt1:Point, pt2:Point, f:Number) : Point

Determines a point between two specified points.

 

normalize(length:Number) : Void

Scales the line segment between (0,0) and the current point to a set length.

 

offset(dx:Number, dy:Number) : Void

Offsets the Point object by the specified amount.

static

polar(len:Number, angle:Number) : Point

Converts a pair of polar coordinates to a Cartesian point coordinate.

 

subtract(v:Point) : Point

Subtracts the coordinates of another point from the coordinates of this point to create a new point.

 

toString() : String

Returns a string that contains the values of the x and y coordinates.

Methods inherited from class Object

addProperty (Object.addProperty method), hasOwnProperty (Object.hasOwnProperty method), isPropertyEnumerable (Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf method), registerClass (Object.registerClass method), toString (Object.toString method), unwatch (Object.unwatch method), valueOf (Object.valueOf method), watch (Object.watch method)



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/00002050.html