This script is licensed under a Creative Commons License. It allows you to use, modify and redistribute the script as long as you use it non-commercially and credit me as the author. For commercial use, I distribute licenses of the script at a fee of 15 euros. One license applies to a single project, and you don't have to credit me as the author anymore. Please contact me for obtaining licenses!
All settings of the mp3player can be made at three different places: in the config.xml file, the playlist.xml file and the mp3player.html file. You can open all three files in a text editor. I've added comments in these files to explain all settings. The config.xml file contains all settings relating to the colors and behavior of the mp3player. The playlist.xml contains a list of all songs and links in the playlist.
If you want to use the mp3player on your own website, you can put all MP3 files in the 'mp3' folder and upload everything to your website. Make sure you've also added the 'mp3/' directory to the locations in the playlist, like I did!
If you want to use the mp3player on a profile site like MySpace, or in a content management system like WordPress, you can put all mp3 files, plus the mp3player.swf/config.xml/playlist.xml to a suitable place on the website or free file service. You need to refer to the mp3 files in the playlist with the full pathname (so including the http://www.. part).
In your profile or CMS, you can use the following code to insert the mp3player. I assume all files are on the location 'http://www.server.com/folder/', so you can just replace that with your files' location.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="200" id="mp3player" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" > <param name="movie" value="http://www.server.com/folder/mp3player.swf?config=http://www.server.com/folder/config.xml&file=http://www.server.com/folder/playlist.xml" /> <param name="wmode" value="transparent" /> <embed src="http://www.server.com/folder/mp3player.swf?config=http://www.server.com/folder/config.xml&file=http://www.server.com/folder/playlist.xml" wmode="transparent" width="300" height="200" name="mp3player" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>
For MySpace, you only need the a single line. I'm not sure about other profile sites, but I presume the same code would work there as well:
<embed allowScriptAccess="never" src="http://www.server.com/folder/mp3player.swf" menu="false" quality="high" width="300" height="200" name="mp3player" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="&config=http://www.server.com/folder/config.xml&file=http://www.server.com/folder/playlist.xml" wmode="transparent" border="0" />
Next to refering to the SWF file with an absolute URL, this code also hands the SWF the location of the config.xml and playlist.xml, through the 'config' and 'file' variables. You can change both to whatever location you want, or even assign PHP/ASP files to dynamically get content from a database. Note that the xml files, unlike the MP3 files, always have to be on the same website as the mp3player.swf (security restrictions from flash).
The 'file' variable, as described above, can be assigned to an XML playlist, but also to a single MP3 ('mp3player.swf?file=mysong.mp3'). The mp3player will then discard the playlist. You can use the config.xml to change the appearance of the mp3player, bu also discard it, in which case the mp3player will show as the default grey bar. This is a quick way to embed an MP3 file with playback controls into your website.
If you want to use the mp3player inside another Flash movie, you can simply copy-paste the 'mp3player' movieclip from the FLA into your own Flash file. If you also copy both .AS files to your Flash file's directory, the script will automatically be attached to the movieclip. At the top of the jwMp3player.as file, there's a lot of settings you can make, including all settings from the config.xml (which you can discard from then).
One note on the 'width' and 'height' variables: they are re-set later on in the script in the readConfigXML() function. You can remove these two lines from the function.
Next to the necessary files, this readme and the source code of the script, this package contains a couple of extras that might be useful in deploying the script:
For more extras, tips and tricks you can always have a look at my forum's Flash MP3 Player threads!