The SoundEffect class plays an MP3 audio file. For example, you could play a sound when a user clicks a Button control. This effect lets you repeat the sound, select the source file, and control the volume and pan.
You specify the MP3 file using the source property. If you have already embedded the MP3 file, using the Embed keyword, you can pass the Class object of the MP3 file to the source property. Otherwise, specify the full URL to the MP3 file.
The <mx:SoundEffect> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:
<mx:SoundEffect
Properties
id=”ID”
autoLoad=”true|false”
bufferTime=”1000″
loops=”0″
panEasingFunction=”"
panFrom=”0″
source=”"
startTime=”0″
useDuration=”true|false”
volumeEasingFunction=”true|false”
volumeTo=”1″
Events
complete=”No default”
id3=”No default”
ioError=”No default”
progress=”No default”
/>
| Package | mx.effects |
| Class | public class SoundEffect |
| Inheritance | SoundEffect Effect EventDispatcher Object |







