Adding Sound to a ButtonEdit
One of the most common ways to incorporate sounds into an interactive movie or website is to attach a sound to a button. Typically sounds are applied to either rolling over or pressing down on a button. This can be done by adding a new layer to a button’s timeline. Then you would add the keyframes for the beginning and ending of the sound. After selecting the beginning keyframe, just drag the sound file from the library to the stage, and it will automatically appear in the timeline. You will have several editing capabilities available to you in the Property inspector, such as; Sync, Repeat, Effect, and Edit. These options will help you choose how you want your file to sound.
One of the newest functions found in Flash 8 for managing sound files in your presentation is the Behaviors menu. This menu offers increased editing capabilities for loading and controlling sound files.
Under the sound option there are five different menu tools.
Load Sound from Library
Load streaming MP3 file
Stop all Sounds
Event Sound StopEdit
If you need to stop an event sound you can do this a couple of different ways. The first method is done by creating a Stop sound on a keyframe in the main timeline of the presentation. Another option is creating a button, giving it an instance name, and then attaching a stop sound to its down state.
When you load a streaming MP3 the file will run directly from the Flash Player. When this occurs, MP3 files are accessed from a public web server rather than from the movie’s library. The file begins playback as soon as there is enough information buffered into the Flash Player. Another term for this kind of streaming is progressive download.
Since streaming MP3s begin to playback automatically you will need to utilize ActionScript in order to play and/or stop the