Add (Point.add Method); Clone (Point.clone Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Methods inherited from class Object
addProperty (Object.addProperty
(Object.hasOwnProperty
(Object.isPropertyEnumerable
method),
registerClass (Object.registerClass
(Object.toString
(Object.valueOf
method),

add (Point.add method)

public add(v:Point) : Point
Adds the coordinates of another point to the coordinates of this point to create a new point.
Availability: ActionScript 1.0; Flash Player 8
Parameters
v:flash.geom.Point
Returns
- The new point.
flash.geom.Point
Example
The following example creates a Point object
import flash.geom.Point;
var point_1:Point = new Point(4, 8);
var point_2:Point = new Point(1, 2);
var resultPoint:Point = point_1.add(point_2);
trace(resultPoint.toString()); // (x=5, y=10)

clone (Point.clone method)

public clone() : Point
Creates a copy of this Point object.
Availability: ActionScript 1.0; Flash Player 8
Returns
- The new Point object.
flash.geom.Point
method),
method),
isPropertyEnumerable
method),
method),
unwatch (Object.unwatch
watch (Object.watch method)
- The point to be added.
hasOwnProperty
isPrototypeOf (Object.isPrototypeOf
method),
toString
method),
by adding
resultPoint
Point (flash.geom.Point)
valueOf
to
point_2
point_1
1011
.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents