Share this Page URL
Help

Chapter 2. ActionScript classes > PrintJob - Pg. 720

ActionScript classes Example 720 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 myPoint and sets the x coordinate value. 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