Music - Playlist with Links

Xanga Scripts

Author's Comments

Look carefully for specific instructions

Copy and paste the following script (either custom header or website stats).

<script>
function PlaySong(name)
{
var text =
"<embed src = \"" + name + "\" type = \"audio/x-bmx\" " +
"backcolor = \"200, 200, 200\" " +
"scrollspeed = 0 " +
"infocolor = \"0, 140, 200\" " +
"width = 0 height = 0" +
">";
if (document.all)
{
// Internet explorer
document.all.Plugin.innerHTML = text;
}
else
{
// Netscape
document.Plugin.document.write(text);
document.Plugin.document.close();
}
}
</script>
<div ID = "Plugin"></div>


If you want a certain song to start playing automatically go to the bottom of the script that you just pasted. Find the following:

<div ID = "Plugin"></div>

Modify this code so that it looks like the following:

<div ID="Plugin"><embed src="http://SONG URL" hidden=true autostart=true>
<noembed>
<bgsound src="http://SONG URL">
</noembed></div>

Copy and paste the following code wherever you want the links to appear (custom header if you want it near the top, website stats if you want it near the bottom).
<textarea style='width:540px' rows='8' name='code'><!-- begin code provided by createblog.com -->
<div ID = "PlayList">
Choose your song:
<a href = "javascript:PlaySong('http://SONG URL 1')" title="Song title - Artist">1</a>
<a href = "javascript:PlaySong('http://SONG URL 2')" title="Song title - Artist">2</a>
<a href = "javascript:PlaySong('http://SONG URL 3')" title="Song title - Artist">3</a>
<a href = "javascript:PlaySong('http://SONG URL 4')" title="Song title - Artist">4</a>
| <a href = "javascript:PlaySong('#')" title="Mute Music">OFF</a>
</div>

You can add more links by adding more of the following:

<a href = "javascript:PlaySong('http://SONG URL')" title="Song title - Artist">Song #</a>

If you're good with HTML, you can edit the code where appropriate to format the appearance of your playlist. For instance, you can replace the numbers with the actual song name and artist. Or you can have the links line up vertically rather than horizontally.

This is only for those who know how to work with image maps. Add the onClick attribute to your area tags as shown in the following:

<area shape="rect" coords="1,2,3,4" onClick = "PlaySong('http://SONGURL')" alt="Artist - Song Title">
<area shape="rect" coords="1,2,3,4" onClick = "PlaySong('#')" alt="Mute Song">
----------------------------------------------------------------------

You can find a lot of music (that should work with this code) from http://xanga.com/a__music__x]a__music__x

Script Comments

No comments yet. Be the first one to comment!

Script Details

Author xquizit View profile
Submitted on Mar 1, 2006
Page views 35,784
Favorites 8
Comments 0

Script Tags