HTML/CSS Service

Flex SoundEffect

Category: Flex Examples    |    2,154 views

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

Share/Save/Bookmark

1 Star2 Stars

Tags: ,

1 response so far!

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word