width (BitmapData.width property)

public width : Number [read-only]

The width of the bitmap image in pixels.

Availability: ActionScript 1.0; Flash Player 8

Example

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

Version 8

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00001971.html