Mini Flash Music Player, Song Playlists |
Mini Flash Music Player, Song Playlists |
![]()
Post
#1
|
|
dSlice™ ![]() ![]() Group: Member Posts: 19 Joined: Feb 2004 Member No: 2,814 ![]() |
Alright many of you have been given out code for playlist on your MySpace...but people were complaing that you couldn't choose the songs you want to listen to. So this is for those people...
First things first, you need to download the player and playlist file (click here~9kb) The file is in .zip format, which requires IZArc to extract! Once you've downloaded and extracted the file, you will have two files, player.swf and playlist.xml. Open up playlist.xml in notepad, or whatever text editor you use. Edit the lines that appear like this: <song path="Song Link Here.mp3" title="Artist - Track" /> By putting the EXACT URL to your mp3 file in the "path" attribute, and then the Artist and Track name in the "title" attribute. Of course if you have more songs than there are lines in the xml file, you can add as many more as you like! Now upload your completed playlist.xml file and player.swf to your webhost of choice (like UploadHut.com), once uploaded, use the following code to embed it on your page: <embed src="http://pathto/player.swf" menu="false" quality="high" bgcolor="EEEEEE" width="300" height="320" name="index" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="playList=http://pathto/playlist.xml&ShowPlaylist=1&ShowEQ=1&firstTrack=1&initVol=50" wmode="transparent" /> The values in bold need to be changed to your specific requirements. src - Set this to the EXACT URL of your player.swf file. bgcolor - Set this to any 6 digit hex code to change the colour of the player. playList - set this to the EXACT URL of your playlist.xml file. ShowPlaylist - This controls whether the playlist is visible upon startup. 1 for yes, 0 for no. ShowEQ - This controls whether the equilizer is visible on startup. 1 for yes, 0 for no. firstTrack - Sets which track should be played initially. Setting 0 will turn autostart off. initVol - Sets the initial volume of the player. 0 (mute) to 100 (maximum) And that's that! You could even extend this further by putting the player in a DIV container, and absolutely positioning it anywhere on your page! |
|
|
![]() |
![]()
Post
#2
|
|
Newbie ![]() Group: Member Posts: 3 Joined: Jun 2005 Member No: 156,958 ![]() |
^ That's not going to work.
Your text is being parsed and the embed tag is replaced with iframe. when the embed tag is removed so is your flashvars attribute that points to your playlist. you need to pass the flashvars manually through the url. Also since the parser looks for the url to end with a swf(if not it removes it), create a bogus variable(here it is throw) and set it to a bogus swf file(throw.swf) Change the src and the playlist from this example to match yours and you will be gold. If anyone figures out how to change the iframe's background to transparent i'd love to hear about it. But I assume it's something thats already set in the stylesheet with precedence. Oh, and F Tom, he wouldn't need to filter stuff like this out if he knew how to script properly. No thanks necessary ![]() current myspace view this in firefox to really see the extent of what css can do |
|
|
![]() ![]() |