Log In · Register

 
Left Module Question
cheesecake
post Jun 14 2006, 02:43 PM
Post #1


Newbie
*

Group: Member
Posts: 8
Joined: Mar 2006
Member No: 385,821



Hi, I was trying to put my music player in a left module, and it wasn't working.

I have this code:
CODE
<script>
titleContent = 'music.';
moduleContent = '<!-- begin code provided by createblog.com -->
<object id="darkplayer" codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" type="application/x-oleobject" height="0" standby="Loading Microsoft Windows Media Player components..." width="0" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95">
<param NAME VALUE>
<param NAME="ShowControls" VALUE="0">
<param NAME="ShowStatusBar" VALUE="0">
<param NAME="ShowDisplay" VALUE="0">
<param NAME="DefaultFrame" VALUE="Slide">
<param NAME="Autostart" VALUE="1">
<param NAME="Loop" VALUE="True">
</object>
</p>
<form name="form">
<p style="text-align: center">
<select style="FONT-SIZE: 7pt; BACKGROUND:#444444; WIDTH: 150; COLOR: #ffffff; font-face: arial; height:174" name="playlist" size="1">
<option value="0"> Fell In Love With A Girl </option>
<option value="1"> Romantic Rights </option>
<option value="2"> The New Year </option>
<option value="3"> Date With The Night </option>
<option value="4"> Junior Kickstart </option>
<option value="5"> Pressed In A Book </option>
<option value="6"> Be Gentle With Me </option>
<option value="7"> Concerning The UFO Sighting... </option>
<option value="8"> I Have No Sister </option>
<option value="9"> Boxcar </option>
<option value="10"> Banquet </option>
<option value="11"> Circle Square Triangle </option>
<option value="12"> Such Great Heights </option>
<option value="13"> Parade of Punk Rock T-Shirts </option>
<option value="14"> Insistor </option>
</select><br>
<input TYPE="BUTTON" NAME="darkplay" VALUE="p l a y" OnClick="play(document.forms['form'].playlist);">
<input TYPE="BUTTON" NAME="darkpause" VALUE="p a u s e" OnClick="document.darkplayer.pause(); playstate=2;">
<input TYPE="BUTTON" NAME="darkstop" VALUE="s t o p" OnClick="document.darkplayer.stop(); playstate=2;"></p>
</form>


<script language="JavaScript">
<!--
var playstate = 1;
shuffle = 1;  // set to 0 to always play first song in list
               // set to 1 to randomly choose the first song to play
  // www.xanga.com/smartypants91780
   // unlimited songs, just copy and paste the song line and change the number
songs=new Array();
songs[0]=" http://www.mytlsp.net/yinyue/w/whitest/Fell_In_Love_With_A_Girl.mp3"
songs[1]="http://audio.sxsw.com/2005/mp3/archive/Death_From_Above_1979-Romantic_Rights.mp3"
songs[2]="http://www.vaguespace.net/blog/files/01_the_new_year.mp3"
songs[3]="http://www.users.qwest.net/%7Emezoic/yyydwtn.mp3"
songs[4]="http://ia200131.eu.archive.org/hdb1/audio/rwb003/rwb003-a1-the_go_team-junior_kickstart.mp3"
songs[5]="http://split.org/random/Oh,%20Inverted%20World/10%20-%20Pressed%20in%20a%20Book.mp3"
songs[6]="http://audio.sxsw.com/2006/mp3/The_Boy_Least_Likely_To-Be_Gentle_With_Me.mp3"
songs[7]="http://aquarium.lipetsk.ru/LJ/music/SufjanStevens2005/01.mp3"
songs[8]="http://www.earfood.net/music/OhNo_IHaveNoSister.mp3"
songs[9]="http://therosebuds.com/mp3s/rosebuds-boxcar.mp3"
songs[10]="http://chris.europe2blog.fr/podcast/blockparty.mp3"
songs[11]="http://centralvillage.blogs.com/cv/files/05_circle_square_triangle.mp3"
songs[12]="http://www.filelodge.com/files/hdd7/151579/Iron%20and%20Wine%20-%20Such%20Great%20Heights%20%28the%20postal%20service%20cover%29.mp3"
songs[13]="http://www.flameshovel.com/mp3/MA04-parade.mp3"
songs[14]="http://tapesntapes.com/Insistor.mp3"
if (shuffle == 1) {
var randsg = Math.floor(Math.random()*songs.length);
document.darkplayer.FileName = songs[randsg];
document.darkplayer.scr = songs[randsg];
document.forms['form'].playlist.options[randsg].selected = true;
}
function play(list) {
if (playstate == 2) {
document.darkplayer.Play();
} else {
var snum = list.options[list.selectedIndex].value
document.darkplayer.FileName = songs[snum];
document.darkplayer.scr = songs[snum];
}
playstate = 1;
}
//-->
  </script>
<!-- end code provided by createblog.com -->
<!-- end code provided by createblog.com -->';
sub = subTitle.parentNode.parentNode.parentNode.parentNode.parentNode
sub.insertAdjacentHTML('beforeBegin','<table border="1" cellspacing="0" cellpadding="4" width="100%" class="left"><tr><th valign="top" align="left" class="left">' + titleContent + '</th></tr><tr><td valign="top" class="left">' + moduleContent)
sub.insertAdjacentHTML('beforeBegin','<BR>');
</script>


I've used the code to add a module before, and it works with the counter I have, but it won't work with this. Is this possible, or did I just do something wrong?

Thanks _smile.gif
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: