Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > BitmapData (flash.display.BitmapData) > rectangle (BitmapData.rectangle property) | |||
public rectangle : Rectangle [read-only]
The rectangle that defines the size and location of the bitmap image. The top and left of the rectangle are 0; the width and height are equal to the width and height in pixels of the BitmapData object.
Availability: ActionScript 1.0; Flash Player 8
The following example shows that the rectangle property of the Bitmap instance is read-only by trying to set it and failing:
import flash.display.BitmapData;
import flash.geom.Rectangle;
var myBitmapData:BitmapData = new BitmapData(100, 80, false, 0x00CCCCCC);
var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
trace(myBitmapData.rectangle); // (x=0, y=0, w=100, h=80)
myBitmapData.rectangle = new Rectangle(1, 2, 4, 8);
trace(myBitmapData.rectangle); // (x=0, y=0, w=100, h=80)
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00001965.html
Comments
rachan@adobe said on Dec 4, 2006 at 4:41 PM :