Flash MX Audio Player
An in depth look at building a reusable streaming audio preloader for Flash MX that includes media controls.

01 Introduction
02 What should the media player do? / How should the player be structured? / Useful reading
03 Part 1: Start with some easy audio
04 Putting the sound on the stage / Adding a sample graphic
05 Animating the waveform
06 Part 2: Planning our controls / Getting the sound to play, pause and rewind
07 Adding a load indicator
08 Adding a thumb dragger to the slider
09 Dragger states
10 Limiting the dragger / Setting the sound's playhead position
11 Making the media controls ready for sharing
12 Part 3: Using the media player
13 Anything else? / Conclusion / About the authors / Copyright
Previous << What should the media player do? / How should the player be structured? / Useful reading
Part 1: Start with some easy audio
Our first task is to get some audio in to Flash and have it play.
Create a new FLA file. Save it as "test.fla".
Rename "Layer 1" to "media".

Import your audio by selecting "File > Import..." (Ctrl+R). Select your favourite audio file in the Import dialog. If you now open your Library window (F11), you will see your imported audio file ready for use. Well, it's nearly ready... let's check out the Sound Properties.
Double-click on the speaker icon in the Library next to the sound file that you just imported. You should see this dialog:

The Compression combo box contains a list of all of the different types of compression settings that Flash can use. By playing with these settings, you can get a feeling for the final file size you will end up with.

And clicking on the Test button will let you hear what the compression will do to the sound. Click on OK when you have it to your liking.
Try it now. I'm going to make a coffee. I'll be right back.
Next >> Putting the sound on the stage / Adding a sample graphic
01 Introduction
02 What should the media player do? / How should the player be structured? / Useful reading
03 Part 1: Start with some easy audio
04 Putting the sound on the stage / Adding a sample graphic
05 Animating the waveform
06 Part 2: Planning our controls / Getting the sound to play, pause and rewind
07 Adding a load indicator
08 Adding a thumb dragger to the slider
09 Dragger states
10 Limiting the dragger / Setting the sound's playhead position
11 Making the media controls ready for sharing
12 Part 3: Using the media player
13 Anything else? / Conclusion / About the authors / Copyright
© 2003 Glasson Murray Group Pty Ltd (ACN 098 651 542), Western Australia. All rights reserved. |