Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > BitmapData (flash.display.BitmapData) > width (BitmapData.width property) | |||
public width : Number [read-only]
The width of the bitmap image in pixels.
Availability: ActionScript 1.0; Flash Player 8
The following example shows that the width property of the Bitmap instance is read-only by trying to set it and failing:
import flash.display.BitmapData;
var myBitmapData:BitmapData = new BitmapData(100, 80, false, 0x00CCCCCC);
var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
trace(myBitmapData.width); // 100
myBitmapData.width = 999;
trace(myBitmapData.width); // 100
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00001423.html