BitmapItem object

 < Day Day Up > 

Inheritance Item object > BitmapItem object

Availability

Flash MX 2004.

Description

A BitmapItem object refers to a bitmap in the library of a document. The BitmapItem object is a subclass of the Item object (see Item object).

Property summary for the BitmapItem object

In addition to the Item object properties, the BitmapItem object has following properties:

Property

Description

bitmapItem.allowSmoothing

A Boolean value that specifies whether to allow smoothing of a bitmap.

bitmapItem.compressionType

A string that determines the type of image compression applied to the bitmap.

bitmapItem.quality

An integer that specifies the quality of the bitmap

bitmapItem.useImportedJPEGQuality

A Boolean value that specifies whether to use the default imported JPEG quality.


bitmapItem.allowSmoothing

Availability

Flash MX 2004.

Usage

bitmapItem.allowSmoothing

Description

Property; a Boolean value that specifies whether to allow smoothing of a bitmap (TRue) or not (false).

Example

The following code sets the allowSmoothing property of the first item in the library of the current document to TRue:

fl.getDocumentDOM().library.items[0].allowSmoothing = true; alert(fl.getDocumentDOM().library.items[0].allowSmoothing);

bitmapItem.compressionType

Availability

Flash MX 2004.

Usage

bitmapItem.compressionType

Description

Property; a string that determines the type of image compression applied to the bitmap. Acceptable values are "photo" or "lossless". If the value of bitmapItem.useImportedJPEGQuality is false, "photo" corresponds to JPEG with a quality from 0 to 100; if bitmapItem.useImportedJPEGQuality is true, "photo" corresponds to JPEG using the default document quality value. The value "lossless" corresponds to GIF or PNG format. (See bitmapItem.useImportedJPEGQuality.)

Example

The following code sets the compressionType property of the first item in the library of the current document to "photo":

fl.getDocumentDOM().library.items[0].compressionType = "photo"; alert(fl.getDocumentDOM().library.items[0].compressionType);

bitmapItem.quality

Availability

Flash MX 2004.

Usage

bitmapItem.quality

Description

Property; an integer that specifies the quality of the bitmap. To use the default document quality, specify -1; otherwise, specify an integer from 0 to 100. Available only for JPEG compression.

Example

The following code sets the quality property of the first item in the library of the current document to 65:

fl.getDocumentDOM().library.items[0].quality = 65; alert(fl.getDocumentDOM().library.items[0].quality);

bitmapItem.useImportedJPEGQuality

Availability

Flash MX 2004.

Usage

bitmapItem.useImportedJPEGQuality

Description

Property; a Boolean value that specifies whether to use the default imported JPEG quality (true) or not (false). Available only for JPEG compression.

Example

The following code sets the useImportedJPEGQuality property of the first item in the library of the current document to true:

fl.getDocumentDOM().library.items[0].useImportedJPEGQuality = true; alert(fl.getDocumentDOM().library.items[0].useImportedJPEGQuality);

     < Day Day Up > 


    Developing Extensions for Macromedia Flash 8
    Developing Extensions for Macromedia Flash 8
    ISBN: 032139416X
    EAN: 2147483647
    Year: 2005
    Pages: 81

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net