Returns
- A string.
String
Example
The following example creates a point and converts its values to a string in the format (x=x,
y=y).
import flash.geom.Point;
var myPoint:Point = new Point(1, 2);
trace("myPoint: " + myPoint.toString()); // (x=1, y=2)
x (Point.x property)
public x : Number
The horizontal coordinate of the point. The default value is 0.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example creates a Point object
import flash.geom.Point;
var myPoint:Point = new Point();
trace(myPoint.x); // 0
myPoint.x = 5;
trace(myPoint.x); // 5
y (Point.y property)
public y : Number
The vertical coordinate of the point. The default value is 0.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example creates a Point object
import flash.geom.Point;
var myPoint:Point = new Point();
trace(myPoint.y); // 0
myPoint.y = 5;
trace(myPoint.y); // 5
1018
ActionScript classes
and sets the x coordinate value.
myPoint
and sets the y coordinate value.
myPoint
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?
Questions and answers