Rectangle (flash.geom.Rectangle)
Object
|
+-flash.geom.Rectangle
public class Rectangle
extends Object
The Rectangle class is used to create and modify Rectangle objects. A Rectangle object is an
area defined by its position, as indicated by its top-left corner point (x, y), and by its width
and its height. Be careful when you design these areas—if a rectangle is described as having its
upper-left corner at 0,0 and has a height of 10 and a width of 20, the lower-right corner is at
9,19, because the count of width and height began at 0,0.
The
,
,
, and
x
y
width
changing the value of one property has no effect on the others. However, the
properties are integrally related to those four—if you change
bottom
; if you change
width
or x property established before you set
left
Rectangle objects are used to support the BitmapData class filters. They are also used in the
MovieClip.scrollRect
instance with specific width, height and scrolling offsets.
Availability: ActionScript 1.0; Flash Player 8
See also
scrollRect (MovieClip.scrollRect property)
Property summary
Modifiers
Property
bottom:Number
bottomRight:Point
height:Number
left:Number
right:Number
1030 ActionScript classes
properties of the Rectangle class are independent of each other;
height
, you are changing
bottom
property to support the ability to crop and scroll a
Description
The sum of the y and height properties.
The location of the Rectangle object's bottom-right
corner, determined by the values of the x and y
properties.
The height of the rectangle in pixels.
The x coordinate of the top-left corner of the
rectangle.
The sum of the x and width properties.
, and so on. And you must have the
height
or
property.
width
right
and
right
, you are changing
right
MovieClip
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?