Play Sound

Use this Action to play a sound.

panels-action-playsound.png  

Only sounds that have been imported can be selected. Use the 'Import...' or 'Reload' buttons to import/reload a .wav or .mp3 sound file.

Note: Due to a limitation in the Flash Player, sounds will only play in response to a Frame Event, or to the Mouse Events, Press, Release, Roll Over or Roll Out. Sounds cannot be played in response to the Mouse Events, Drag Over, Drag Out or Release Outside.

Note: Due to a limitation in the Flash Player, MP3 sounds must have a sample rate of 11025Hz, 22050Hz or 44100Hz.

Import...
You can import a sound file into the movie using the 'Import...' button. You can import Windows .wav files or .mp3 sound files.

Reload
You can reload a previously loaded sound file by selecting the sound in the content tree and using the 'Reload' button. This is useful if the sound file on disk had changed since the last time it was loaded.

Delete
You can delete a sound file from the Movie by selecting it in the 'Content' tree and using the 'Delete' button. This does not delete the sound from your disk drive, it only removes it from within the .swi file and makes it no longer available for playing.
 
Options
You can change options for the playback of a sound by selecting it in the 'Content' tree and using the 'Options' button. This displays the Play Options dialog from, which you can change compression type, looping, volume and simple effects.

Content tree
The 'Content' tree show you the sound objects that are available for playing in this Movie.

Play Options dialog box
Clicking the 'Options' button on the Play Sound section of the 'Action Panel' shows the Play Options dialog box.

playsoundoptions.png  
 
·Compression: specifies the compression method for the sound. The available options are None, ADPCM and MP3  
·Loop sound: specifies how many times the sound will be played. In the example above, the sound called "chimes.wav" is played 10 times. Due to a limitation in the Flash Player there is no 'infinite loop' option. If you want your sound to loop for a very long time, enter a large number such as 50,000  
·Volume: specifies the volume of the sound for playback as a percentage of the original volume  
·Do not play if already playing: lets you stop a sound being triggered multiple times  
·Sound effect: specifies simple sound effects, including fading in or out and panning effects  
·Preload sound: specifies when the sound is defined in the .swf file. See the discussion on the object page of the Export Panel for more information  
·Play: plays the sound with the current setting  
·Stop: stops the currently playing sound. This is useful for a long sound, or a sound with a large number of loops  
 
In the example below, the sound called "chimes.wav" is played when the movie reaches Frame 10.

panels-action-playsound-example.png  

See also Adding Music and Sounds for further information.


[Previous] [Main] [Next]