Hands-On: Flash MX 2004 Working with Sound File
Exercise 19: Loading a Streaming MP3 File
You can load a MP3 music audio file using a built in Flash behavior. The
advantage to this process is that the file is loaded when needed, and it never
increases the size of the original Flash movie. Steaming MP3 files are not a
part of a pre-existing Flash movie, they’re just available form a common
location.
Streaming MP3 audio files begin playing before they’re completely loaded;
for large files this cuts down on the wait time for the page or music to load.
- Select a button object from the Window > Other Panels > Common
Libraries > Buttons and drag it on the Stage, or use a Timeline Keyframe
to place the sound.
Click
the plus sign +, located in the upper-left portion of the Behaviors panel,
point to Sound, and then click Load Steaming MP3 file.
- Enter the URL to the source MP3 file and the sound instance
name placed in the Properties Inspector panel.

- Enter
a unique name in the instance field, I chose music for this exercise.
 
- Click OK.
- Click the Control menu, and then click Test Movie, or [Control] + [Enter]
to test the ActionScript.
|