Example
The following code retrieves the width of the bitmap in pixels:
// Get the number of pixels in the horizontal dimension.
var bmObj = fl.getDocumentDOM().selection[0];
var isBitmap = bmObj.instanceType;
if(isBitmap == "bitmap"){
var numHorizontalPixels = bmObj.hPixels;
}
See also
bitmapInstance.vPixels
bitmapInstance.setBits()
Availability
Flash MX 2004.
Usage
bitmapInstance.setBits(bitmap)
Parameters
An object that contains
bitmap
,
, and
height
width
depth
property is required only for bitmaps with a bit depth of 8 or less and is a string that
cTab
represents a color value in the form
The byte array is meaningful only when referenced by an external library. You typically
use it only when creating an extensible tool or effect.
Returns
Nothing.
Description
Method; sets the bits of an existing bitmap element. This lets you create bitmap effects by
getting the bits out of the bitmap, manipulating them, and then returning the bitmap to
Flash.
44
Objects
,
height
width
properties are integers. The
.
"#RRGGBB"
,
,
, and
depth
bits
cTab
property is a byte array. The
bits
properties. The
Need help?
Do you have a question about the FLASH 8-EXTENDING FLASH and is the answer not in the manual?
Questions and answers