LilAznFlip14
08-23-2004, 07:34 PM
I Need to know how to get the html code for the mutiple songs on xanga like this person http://www.xanga.com/home.aspx?user=protege_1 except i don't want the same songs and i want to put my own songs i need help!!!!! PLZZZZZZZZ HELP!!!!!!!!!
Chris
08-23-2004, 07:54 PM
use the following code, and change the bits in bold
<form name="form">
<p style="text-align: center">
<select style="FONT-SIZE: 8pt; BACKGROUND:#FFFFFF; WIDTH: 200px; COLOR: #FF9900; font-face: arial" name="playlist" size="1">
<option value="0">Song 1 title</option>
<option value="1">Song 2 title</option>
<option value="2">Song 3 title</option>
<option value="3">Song 4 title</option>
</select><br>-
<input TYPE="BUTTON" NAME="buttonname" VALUE="play" OnClick="play(document.forms['form'].playlist);"> -</p>
</form>
<script language="JavaScript">
<!--
var playstate = 0;
shuffle = 1; // set to 0 to always play first song in list
// set to 1 to randomly choose the first song to play
songs=new Array();
songs[0]="http://www.yourdomain.com/song1.mp3";
songs[1]
="http://www.yourdomain.com/song2.mp3";
songs[2]="http://www.yourdomain.com/song3.mp3";
songs[3]
="http://www.yourdomain.com/song4.mp3";
if (shuffle == 1) {
var randsg = Math.floor(Math.random()*songs.length);
document..buttonname.FileName = songs[randsg];
document..buttonname.scr = songs[randsg];
document.forms['form'].playlist.options[randsg].selected = true;
}
function play(list) {
if (playstate == 2) {
document.buttonname.Play();
} else {
var snum = list.options[list.selectedIndex].value
document..buttonname.FileName = songs[snum];
document..buttonname.scr = songs[snum];
}
playstate = 1;
}
//-->
</script>
Make sure that the songs are not copyrighted, and don't direct link. Don't use other peoples bandwidth.
Chris