Newest Articles

MegaCombs
Flash Media Player
XML Driven Pie Chart
Base Defender
Hangman Game
8 Ball Pool


Popular Articles

3d Rotating Image Cube
True Fullscreen Flash Mode
Mp3 Player with XML Playlist
Infinitely Zooming Image
Hangman Game
8 Ball Pool


Random Articles

Motion along a Path
3d Rotating Image Cube
Custom Mouse Cursor
Instantiating an Object
Image Slider with Easing
Alert Box


Links

Foundation-Flash
Reddit
Newgrounds
TWiT
Link to SwfSpot
Swf Spot

Contact me on Google+



rss feed

Mp3 Player with XML Playlist

Mp3 Player with XML Playlist
AddThis Social Bookmark Button
Description: Mp3s are loaded and played using an XSPF playlist
Author: John Bezanis
Added: November 25th 2007
Version: Flash 8


This mp3 player loads a playlist from an XML file using the GET parameter playlist. The GET parameter autostart determines whether or not to start playing the music as soon as the player loads. The quality of the sample songs has been reduced to lower bandwidth use and to avoid copyright issues.
Player Features:
  • Playlist loaded from an xml file
  • The ability to have music autostart or not on load
  • Full volume control
  • Alternating play/pause button
  • Buttons to advance to the previous or next song
  • Scrub bar to advance to any position in a song
  • Scrolling text
  • Scrollbar for the playlist
  • Clicking a playlist item starts that song
  • Autostart of the next song after a song has finished
Example code for the XHTML:
<object data="http://www.somesite.com/musicplayer.swf?autostart=true&playlist=http://www.somesite.com/playlist.xml" type="application/x-shockwave-flash" width="300" height="200"><param name="movie" value="http://www.somesite.com/musicplayer.swf?autostart=true&playlist=http://www.somesite.com/playlist.xml"/></object>

Example XML:
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
 <trackList>
  <track><creator>Iron Maiden</creator><title>Fear of the Dark</title><location>http://www.bezzmedia.com/swfspot/resources/42-song3.mp3</location></track>
  <track><creator>Social Distortion</creator><title>Ring of Fire</title><location>http://www.bezzmedia.com/swfspot/resources/42-song4.mp3</location></track>
 </trackList>
</playlist>


Download the files below:

Download XML File
Download Source File
Download the built Mp3 Player
Comments Currently Disabled