EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Inflatepoint (Rectangle.inflatepoint Method)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1042 ActionScript classes
See also
x (Rectangle.x property), y (Rectangle.y property)
inflatePoint (Rectangle.inflatePoint method)
public inflatePoint(pt:Point) : Void
Increases the size of the Rectangle object. This method is similar to the
Rectangle.inflate() method, except that it takes a Point object as a parameter.
The following two code examples give the same result:
rect1 = new flash.geom.Rectangle(0,0,2,5);
rect1.inflate(2,2)
rect1 = new flash.geom.Rectangle(0,0,2,5);
pt1 = new flash.geom.Point(2,2);
rect1.inflatePoint(pt1)
Availability: ActionScript 1.0; Flash Player 8
Parameters
pt:flash.geom.Point - Increases the rectangle by the x and y coordinate values of the point.
Example
The following example creates a Rectangle object and inflates it by the x (horizontal) and y
(vertical) amounts found in a point.
import flash.geom.Rectangle;
import flash.geom.Point;
var rect:Rectangle = new Rectangle(0, 0, 2, 5);
trace(rect.toString()); // (x=0, y=0, w=2, h=5
var myPoint:Point = new Point(2, 2);
rect.inflatePoint(myPoint);
trace(rect.toString()); // (x=-2, y=-2, w=6, h=9)
See also
Point (flash.geom.Point)

Table of Contents

Related product manuals