The Sound class lets you work with sound in an application. The Sound class lets you create a Sound object, load and play an external MP3 file into that object, close the sound stream, and access data about the sound, such as information about the number of bytes in the stream and ID3 metadata. More detailed control of the sound is performed through the sound source — the SoundChannel or Microphone object for the sound — and through the properties in the SoundTransform class that control the output of the sound to the computer's speakers.
In Flash Player 10 and later and AIR 1.5 and later, you can also use this class to work with sound that is generated dynamically. In this case, the Sound object uses the function you assign to a sampleData event handler to poll for sound data. The sound is played as it is retrieved from a ByteArray object that you populate with sound data. You can use Sound.extract() to extract sound data from a Sound object, after which you can manipulate it before writing it back to the stream for playback.
To control sounds that are embedded in a SWF file, use the properties in the SoundMixer class.
The Sound class lets you work with sound in an application. The Sound class lets you create a Sound object, load and play an external MP3 file into that object, close the sound stream, and access data about the sound, such as information about the number of bytes in the stream and ID3 metadata. More detailed control of the sound is performed through the sound source — the SoundChannel or Microphone object for the sound — and through the properties in the SoundTransform class that control the output of the sound to the computer's speakers.
In Flash Player 10 and later and AIR 1.5 and later, you can also use this class to work with sound that is generated dynamically. In this case, the Sound object uses the function you assign to a sampleData event handler to poll for sound data. The sound is played as it is retrieved from a ByteArray object that you populate with sound data. You can use Sound.extract() to extract sound data from a Sound object, after which you can manipulate it before writing it back to the stream for playback.
To control sounds that are embedded in a SWF file, use the properties in the SoundMixer class.
การแปล กรุณารอสักครู่..
