soundItem.exportToFile()

Availability

Flash CS4 Professional.

Usage

soundItem.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 QuickTime file on the Macintosh, or to a WAV or QT file on Windows. The exported QuickTime or QT files contain only audio; video is not exported. Export settings are based on the item being exported.

Example

Assuming that the first item in the Library is a sound item, the following code exports it as a WAV file:
var soundFileURL = "file:///C|/out.wav"; 
var libItem = fl.getDocumentDOM().library.items[0]; 
libItem.exportToFile(soundFileURL);