bitmapItem.exportToFile()

Availability

Flash CS4 Professional.

Usage

bitmapItem.exportToFile(fileURI)

Parameters

fileURI
A string, expressed as a file:/// URI, that specifies the path and name of the exported file.

Returns

A Boolean value of true if the file was exported successfully; false otherwise.

Description

Method; exports the specified item to a PNG or JPG file.

Example

Assuming the first item in the Library is a bitmap item, the following code exports it as a JPG file:
var imageFileURL = "file:///C|/exportTest/out.jpg"; 
var libItem = fl.getDocumentDOM().library.items[0]; 
libItem.exportToFile(imageFileURL);