Transparent (Bitmapdata.transparent Property); Width (Bitmapdata.width Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

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
After you create a BitmapData object, you can check whether it supports per-pixel
transparency by seeing if the value of the
Availability: ActionScript 1.0; Flash Player 8
Example
The following example shows that the
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

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
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
true
property is
transparent
property of the
transparent
property of the
width
BitmapData (flash.display.BitmapData)
for the
transparent
.
true
instance is read-
Bitmap
instance is read-only by
Bitmap
parameter.
331

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents