Parameters
- The point to be compared.
toCompare:Object
Returns
- If the object is equal to this Point object,
Boolean
Example
The following example determines whether the values of one point are equal to the values of
another point. If the objects are the same,
strict equality operator (
import flash.geom.Point;
var point_1:Point = new Point(1, 2);
var point_2:Point = new Point(1, 2);
var point_3:Point = new Point(4, 8);
trace(point_1.equals(point_2)); // true
trace(point_1.equals(point_3)); // false
trace(point_1 === point_2); // false
trace(point_1 === point_3); // false
interpolate (Point.interpolate method)
public static interpolate(pt1:Point, pt2:Point, f:Number) : Point
Determines a point between two specified points.
Availability: ActionScript 1.0; Flash Player 8
Parameters
pt1:flash.geom.Point
pt2:flash.geom.Point
- The level of interpolation between the two points. Indicates where the new point
f:Number
will be, along the line between pt1 and pt2. If f=0, pt1 is returned; if f=1, pt2 is returned.
Returns
- The new, interpolated point.
flash.geom.Point
Example
The following example locates the interpolated point (
between
and
point_1
import flash.geom.Point;
var point_1:Point = new Point(-100, -100);
var point_2:Point = new Point(50, 50);
equals()
) does.
===
- The first point.
- The second point.
.
point_2
; if it is not equal,
true
does not return the same result that the
interpolatedPoint
Point (flash.geom.Point)
.
false
) half way (50%)
1013
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?