Sounditem.exporttofile(), Sounditem.filelastmodifieddate – Adobe Extending Flash Professional CS4 User Manual
Page 417
395
EXTENDING FLASH CS4 PROFESSIONAL
SoundItem object
Description
Property; a Boolean value available only for MP3 and Raw compression types. Setting this value to
true
converts a
stereo sound to mono;
false
leaves it as stereo. For the MP3 compression type, if
soundItem.bitRate
is less than 20
Kbps, this property is ignored and forced to
true
(see
).
If you want to specify a value for this property, set
soundItem.useImportedMP3Quality
false
.
Example
The following example converts an item in the library to mono only if the item has the MP3 or Raw compression type:
fl.getDocumentDOM().library.items[0].convertStereoToMono = true;
See also
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);
soundItem.fileLastModifiedDate
Availability
Flash CS4 Professional.