EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Height (Rectangle.height Property)

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...
1040 ActionScript classes
import flash.geom.Rectangle;
var rect_1:Rectangle = new Rectangle(0, 0, 50, 100);
var rect_2:Rectangle = new Rectangle(0, 0, 50, 100);
var rect_3:Rectangle = new Rectangle(10, 10, 60, 110);
trace(rect_1.equals(rect_2)); // true;
trace(rect_1.equals(rect_3)); // false;
Even though the method signature expects only an abstract object, only other Rectangle
instances are treated as equal.
import flash.geom.Rectangle;
var rect_1:Rectangle = new Rectangle(0, 0, 50, 100);
var nonRect:Object = new Object();
nonRect.x = 0;
nonRect.y = 0;
nonRect.width = 50;
nonRect.height = 100;
trace(rect_1.equals(nonRect));
See also
x (Rectangle.x property), y (Rectangle.y property), width (Rectangle.width
property)
, height (Rectangle.height property)
height (Rectangle.height property)
public height : Number
The height of the rectangle in pixels. Changing the height value of a Rectangle object has no
effect on the
x, y, and width properties.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example creates a Rectangle object and changes its
height property from 10 to
20. Notice that
rect.bottom is also changed.
import flash.geom.Rectangle;

Table of Contents

Related product manuals