Flash CS3 Documentation |
|||
| Programming ActionScript 3.0 > Working with sound > Example: Podcast Player | |||
A podcast is a sound file that is distributed over the Internet, on demand or by subscription. Podcasts are usually published as part of a series, which is also called a podcast channel. Because podcast episodes can last anywhere from one minute to many hours, they are usually streamed while playing. Podcast episodes, which are also called items, are usually delivered in the mp3 file format. Video podcasts are also popular, but this sample application plays only audio podcasts that use mp3 files.
This example is not a full-featured podcast aggregator application. For example, it does not manage subscriptions to specific podcasts or remember which podcasts the user has listened to the next time the application is run. It could serve as a starting point for a more full-featured podcast aggregator.
The Podcast Player example illustrates the following ActionScript programming techniques:
To get the application files for this sample, see www.adobe.com/go/learn_programmingAS3samples_flash. The Podcast Player application files can be found in the folder Samples/PodcastPlayer. The application consists of the following files:
|
File |
Description |
|---|---|
|
PodcastPlayer.mxml or PodcastPlayer.fla |
The user interface for the application for Flex (MXML) or Flash (FLA). |
|
RSSBase.as |
A base class that provides common properties and methods for the RSSChannel class and the RSSItem class. |
|
RSSChannel.as |
An ActionScript class that holds data about an RSS channel. |
|
RSSItem.as |
An ActionScript class that holds data about an RSS item. |
|
SoundFacade.as |
The main ActionScript class for the application. It encapsulates the methods and events of the Sound class and the SoundChannel class and adds support for pausing and resuming playback. |
|
URLService.as |
An ActionScript class that retrieves data from a remote URL. |
|
playerconfig.xml |
An XML file containing a list of RSS feeds that represent podcast channels. |
Flash CS3