< Day Day Up > |
Inheritance Item object > SoundItem object Availability Flash MX 2004. Description The SoundItem object is a subclass of the Item object. It represents a library item used to create a sound. See also frame.soundLibraryItem and Item object. Property summary for the SoundItem objectIn addition to the Item object properties, the following properties are available for the SoundItem object:
soundItem.bitRateAvailability Flash MX 2004. Usage soundItem.bitRate Description Property; a string that specifies the bit rate of a sound in the library. This property is available only for the MP3 compression type. Acceptable values are "8 kbps", "16 kbps", "20 kbps", "24 kbps", "32 kbps", "48 kbps", "56 kbps", "64 kbps", "80 kbps", "112 kbps", "128 kbps", and "160 kbps". Stereo sounds exported at 8 or 16 kbps are converted to mono. The property is undefined for other compression types. NOTE If you want to specify a value for this property, set soundItem.useImportedMP3Quality to false. Example The following example displays the bitRate value in the Output panel if the specified item in the library has MP3 compression type: alert(fl.getDocumentDOM().library.items[0].bitRate); See also soundItem.compressionType, soundItem.convertStereoToMono soundItem.bitsAvailability Flash MX 2004. Usage soundItem.bits Description Property; a string that specifies the bits value for a sound in the library that has ADPCM compression. Acceptable values are "2 bit", "3 bit", "4 bit", and "5 bit". NOTE If you want to specify a value for this property, set soundItem.useImportedMP3Quality to false. Example The following example displays the bits value in the Output panel if the currently selected item in the library has ADPCM compression type: alert(fl.getDocumentDOM().library.items[0].bits); See also soundItem.compressionType soundItem.compressionTypeAvailability Flash MX 2004. Usage soundItem.compressionType Description Property; a string that specifies that compression type for a sound in the library. Acceptable values are "Default", "ADPCM", "MP3", "Raw", and "Speech". NOTE If you want to specify a value for this property, set soundItem.useImportedMP3Quality to false. Example The following example changes an item in the library to compression type Raw: fl.getDocumentDOM().library.items[0].compressionType = "Raw"; The following example changes a selected item's compression type to Speech: fl.getDocumentDOM().library.getSelectedItems()[0].compressionType = "Speech"; soundItem.convertStereoToMonoAvailability Flash MX 2004. Usage soundItem.convertStereoToMono Description Property; a Boolean value available only for MP3 and Raw compression types. Setting this to TRue converts a stereo sound to mono; false leaves it as stereo. For MP3 compression type, if soundItem.bitRate is less than 20 Kbps, this property is ignored and forced to TRue (see soundItem.bitRate). NOTE If you want to specify a value for this property, set soundItem.useImportedMP3Quality to false. Example The following example converts an item in the library to mono, only if the item has MP3 or Raw compression type: fl.getDocumentDOM().library.items[0].convertStereoToMono = true; See also soundItem.compressionType soundItem.qualityAvailability Flash MX 2004. Usage soundItem.quality Description Property; a string that specifies the playback quality of a sound in the library. This property is available only for MP3 compression type. Acceptable values are "Fast", "Medium", and "Best". NOTE If you want to specify a value for this property, set soundItem.useImportedMP3Quality to false. Example The following example sets the playback quality of an item in the library to Best, if the item has MP3 compression type: fl.getDocumentDOM().library.items[0].quality = "Best"; See also soundItem.compressionType soundItem.sampleRateAvailability Flash MX 2004. Usage soundItem.sampleRate Description Property; a string that specifies the sample rate for the audio clip. This property is available only for ADPCM, Raw, and Speech compression types. Acceptable values are "5 kHz", "11 kHz", "22 kHz", and "44 kHz". NOTE If you want to specify a value for this property, set soundItem.useImportedMP3Quality to false. Example The following example sets the sample rate of an item in the library to 5 kHz, if the item has ADPCM, Raw, or Speech compression type: fl.getDocumentDOM().library.items[0].sampleRate = "5 kHz"; See also soundItem.compressionType soundItem.useImportedMP3QualityAvailability Flash MX 2004. Usage soundItem.useImportedMP3Quality Description Property; a Boolean value. If TRue, all other properties are ignored and the imported MP3 quality is used. Example The following example sets an item in the library to use the imported MP3 quality: fl.getDocumentDOM().library.items[0].useImportedMP3Quality = true; See also soundItem.compressionType |
< Day Day Up > |