Isempty (Rectangle.isempty Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Availability: ActionScript 1.0; Flash Player 8
Parameters
toIntersect:flash.geom.Rectangle
Rectangle object.
Returns
- If the specified object intersects with this Rectangle object, returns
Boolean
.
false
Example
The following example determines whether
import flash.geom.Rectangle;
var rectA:Rectangle = new Rectangle(10, 10, 50, 50);
var rectB:Rectangle = new Rectangle(59, 59, 50, 50);
var rectC:Rectangle = new Rectangle(60, 60, 50, 50);
var rectAIntersectsB:Boolean = rectA.intersects(rectB);
var rectAIntersectsC:Boolean = rectA.intersects(rectC);
trace(rectAIntersectsB); // true
trace(rectAIntersectsC); // false
var firstPixel:Rectangle = new Rectangle(0, 0, 1, 1);
var adjacentPixel:Rectangle = new Rectangle(1, 1, 1, 1);
var pixelsIntersect:Boolean = firstPixel.intersects(adjacentPixel);
trace(pixelsIntersect); // false
See also
x (Rectangle.x property)
,
property)
height (Rectangle.height property)

isEmpty (Rectangle.isEmpty method)

public isEmpty() : Boolean
Determines whether or not this Rectangle object is empty.
Availability: ActionScript 1.0; Flash Player 8
Returns
- If the Rectangle object's width or height is less than or equal to 0, returns
Boolean
otherwise
.
false
1044 ActionScript classes
- The Rectangle object to compare against this
rectA
,
y (Rectangle.y property)
intersects with
rectB
,
width (Rectangle.width
; otherwise
true
or
.
rectC
;
true

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF