Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > BitmapData (flash.display.BitmapData) > transparent (BitmapData.transparent property) | |||
public transparent : Boolean [read-only]
Defines whether the bitmap image supports per-pixel transparency. You can set this value only when you construct a BitmapData object by passing in true for the transparent parameter. After you create a BitmapData object, you can check whether it supports per-pixel transparency by seeing if the value of the transparent property is true.
Availability: ActionScript 1.0; Flash Player 8
The following example shows that the transparent 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.transparent); // false
myBitmapData.transparent = true;
trace(myBitmapData.transparent); // false
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/00001970.html