ruairimccomb.com

Projects

Flash mp3 player 21/05/2005

This flash mp3 player is an easy way to add a music player to your site.

The mp3player expects a file named songs.xml in the same directory as the mp3-player.swf file.

<?xml version="1.0" encoding="UTF-8"?>
<songs>
<song title="No meaning no - Chuck D with Fine Arts Militia" url="mp3/no-meaning-no.mp3" />
<song title="Now get busy - Beasty Boys" url="mp3/now-get-busy.mp3" />
<song title="One big holiday - My Morning Jacket" url="mp3/one-big-holiday.mp3" />
</songs>

The root element songs must contain one or more song elements. Each song element has a title and url attribute. The url attribute is relative to the directory mp3-player.swf is located.

Download

The mp3 files included are samples from The Wired CD.

Usage

  1. Modify the songs.xml file, you can also modify the mp3-player.html to suit your needs.
  2. Upload the files to a directory on your server.
  3. ?
  4. Profit!

Examples

You can see an example of the player in use here:

External

I’ve used some code from moock. The Sound Class mp3 loader is what allows the % loaded to be seen.

PS. All text in the player is Spanish. Anybody know about a good localization library for Flash?