Accessibility
 
Home > Products > Flash > Support > Sound
Flash Icon Macromedia Flash Support Center - Sound
Creating a sound player in Flash

In this article you'll learn how to use the ActionScript Sound object to make a Macromedia Flash movie that starts and stops a sound and controls its volume and balance, similar to the sample movie below.


To view this demo, you need the latest version of the Macromedia Flash Player.
Download the free Macromedia Flash Player now.

Get Macromedia Flash Player

To use, click the Play button (the small arrow at the bottom of the player) to start the sound. Drag the sliders to control the sound's volume and balance. Click the Stop button (the small square) to stop the sound from playing.

This article is intended for intermediate Flash users who have a basic familiarity with ActionScript.

Download the Windows Sound Player source file (208K)
Download the Macintosh Sound Player source file (276K)

If you have trouble downloading or decompressing the files, see TechNote 13686.

About the artwork
About ActionScript objects
Attaching a sound to a Timeline
Creating a Play button
Creating a Stop button
Creating a volume control slider
Creating a balance control slider
Customizing the sliders


Tim Statler

Tim Statler writes tutorials for the macromedia.com support site.

23 January 2002

Flash, sound object, tutorial, Sound.setVolume, setVolume, volume, set, method, balance, setPan, pan, slider, shared library, libraries, export, linkage

9879