Developer Network Home  Help 

YDN Flash Developer Center Astra Flash Components Using AudioPlayback
Flash Developer Center

ASTRA AudioPlayback

AudioPlayback is a UI component that creates a set of controls for audio playback.

Using AudioPlayback in Flash CS3

In Getting Started, we created a simple AudioPlayback component with a form field to input the audio url. In this example, we will allow the user to populate a playlist through the form field. The player will then cycle through the songs on the playlist.

For starters, let's go ahead and import all the classes we will need for the tutorial.

We will need the following variables

We will need the following component for our application:

The main function for managing the playlist is playClips. It moves to the next or previous song based on the position in the playlist, the increment parameter and the value of continousPlay

Next we'll add the event handlers.

For managing the playlist we have event handlers attached to the AudioPlayback component's mediaEnded event as well as the previous and next buttons.

Finally, we have handlers for the continuous play check box and the playlistButton and loadButton buttons

Example: AudioPlayback with Playlist

To see a live example, please install Adobe Flash Player version 9 or higher.

Download the FLA file.

For additional information, please take a look at the Examples section for functional demonstrations and the ActionScript 3.0 Class Reference for full details on every property, method, and style available to the AudioPlayback component.