MACROMEDIA FLASH 8-EXTENDING FLASH Manual page 43

Extending flash
Table of Contents

Advertisement

Parameters
None.
Returns
An object that contains
properties. The
cTab
values of the form
"#RRGGBB"
The byte array is meaningful only when referenced by a DLL or shared library. You typically
use it only when creating an extensible tool or effect. For information on creating DLLs for
use with Flash JavaScript, see
Description
Method; lets you create bitmap effects by getting the bits out of the bitmap, manipulating
them, and then returning them to Flash. See also
Example
The following code creates a reference to the currently selected object; tests whether the object
is a bitmap; and traces the height, width, and bit depth of the bitmap:
var isBitmap = fl.getDocumentDOM().selection[0].instanceType;
if(isBitmap == "bitmap"){
var bits = fl.getDocumentDOM().selection[0].getBits();
fl.trace("height = " + bits.height);
fl.trace("width = " + bits.width);
fl.trace("depth = " + bits.depth);
}
See also
bitmapInstance.setBits()
bitmapInstance.hPixels
Availability
Flash MX 2004.
Usage
bitmapInstance.hPixels
Description
Read-only property; an integer that represents the width of the bitmap—that is, the number
of pixels in the horizontal dimension.
,
,
width
height
depth
element is an array of bytes. The
bits
. The length of the array is the length of the color table.
Chapter 3, "C-Level Extensibility."
,
, and, if the bitmap has a color table,
bits
element is an array of color
cTab
bitmapInstance.setBits()
BitmapInstance object
.
43

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents