Log In · Register

 
 
Closed TopicStart new topic
Drop Down Music..., :: shudder ::
TAiNTEDxMEMORiES
post May 18 2006, 08:37 AM
Post #1


Senior Member
***

Group: Member
Posts: 72
Joined: Mar 2006
Member No: 386,570



Ok so this is probably the 5782357th topic on this and yes, I've read most of them. But then I got tired. ermm.gif But I have a freewebs account and I put the code in and on mozilla it works but they's an extra box and a play button. But on IE [[at least on mine]] it looks great but won't play. Anyone wanna tell me why? Yes. I am a n00b please use small words.
Mozilla
IE

My code btw is:
CODE
<center><OBJECT ID="Player" height="0" width="0" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<PARAM NAME="uiMode" VALUE="invisible">
<PARAM NAME="Autostart" VALUE="False">
</object>

<FORM ID="form">

<SELECT ID="playlist" size="1">

<!-- Add song info that appears in drop down list here -->

<option value="0">Blink 182 - Adam's Song</option>
<option value="1">Alice In Chains - Would?</option>
<option value="2">Sugarcult - Memory</option>
<option value="3">Nirvana - Rape Me</option>
<option value="4">Oasis - Wonderwall</option>
<option value="5">Lifehouse - You and Me</option>
<option value="6">Daniel Powter - Bad Day</option>
<option value="7">Josh Groban - You Raise Me Up</option>
<option value="8">Azn Pride - Got Rice</option>
<option value="9"> Litmus Green - Go Go Power Rangers</option>
<option value="10"> Britney Spears - Toxic</option>
<option value="11">TBS - Make Damn Sure</option>
<option value="12">KT Tunstall – Black Horse and the Cherry Tree</option>
<option value="13">Maroon 5 - Secret</option>
<option value="14">Shakira – La Tortura</option>
<option value="15">Martina McBride – Concrete Angel</option>
<option value="16">JoDee Messina – My Give A Damn’s Busted</option>
<option value="17">Hollywood Undead – Black Dahlia</option>

<!--<option value="5">Artist - Title</option> -->

</SELECT>

<BR>
<BUTTON ID="BackButton" style="width:20;height:20" onClick="Back(forms['form'].playlist);"/><img src="/taintedxmemories/Picz/back.png"></BUTTON>
<BUTTON ID="PlayPauseButton" style="width:20;height:20" onClick="PlayPause(forms['form'].playlist);"><img src="/taintedxmemories/Picz/play.png"></BUTTON>
<BUTTON ID="NextButton" style="width:20;height:20" onClick="Next(forms['form'].playlist);"><img src="/taintedxmemories/Picz/forward.png"></BUTTON>
<BUTTON ID="StopButton" style="width:20;height:20" onclick="Stop();"><img src="/taintedxmemories/Picz/stop.png"></BUTTON>
<span class="checkbox"><font color="black">Shuffle</font> </span>
<INPUT TYPE=checkbox CHECKED ID="ShuffleSwitch" onclick="ToggleShuffle(this);" value="ON">


</CENTER>
<comment ID="PlayHTML"><img src="/taintedxmemories/Picz/play.png"></comment>
<comment ID="PauseButton" onClick="PlayPause(forms['form'].playlist);"><img src="/taintedxmemories/Picz/pause.png"></comment>
<comment ID="ShuffleOnHTML"> <input type=checkbox checked id="ShuffleSwitch" onClick="ToggleShuffle(this);"> </comment>
<comment ID="ShuffleOffHTML"> <INPUT TYPE=checkbox UNCHECKED ID="ShuffleSwitch" onclick="ToggleShuffle(this);"> </comment>
</FORM>

<script ID="Main" Language="JavaScript">

    var songs = new Array();

    //*******************************//
    //****** CHANGEABLE STUFF *******//
    //*******************************//
    
    var shuffle = true;  // false = shuffle off, true = shuffle on

    var autoStart = true;   // false = autoStart off, true = autoStart on
    
    var numberTracks = false;  // true = place track number in front of list items, false = no track numbers
    
    // Add song URLs here (make sure it matches up with the order you have for song info, and urls need quotes):

songs[0]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/4/237/18340_1_12_04.asf";
songs[1]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/5/3/23087_1_5_04.asf";
songs[2]="http://www.iwebmusic.com/1/1323.WMA";
songs[3]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/2/128/5558_1_4_04.asf";
songs[4]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/0/83/72_1_3_04.asf";
songs[5]="http://boss.streamos.com/wmedia/geffen/life_house/audio/you_and_me/00_lo.asx?siteid=fanscape";
songs[6]="http://clemment.free.fr/zik/Daniel%20Powter%20-%20Bad%20Day.mp3";
songs[7]="http://www.warnerreprise.com/asx/joshgroban_you-raise-me-up_450-v.asx";
songs[8]="http://www.ertari.fissue.org/hymour/audio/gotrice.mp3"
songs[9]="http://www.songs.litmusgreen.com/DoYouFearSomething/Litmus_Green-Do_You_Fear_Something-02-Go_Go_Power_Rangers.mp3"
songs[10]="http://notendur.centrum.is/~kristul/Music/Toxic.mp3"
songs[11]="http://www.angelfire.com/vamp2/ra2ink/Taking_Back_Sunday_-_Make_Damn_Sure.mp3"
songs[12]="http://christ02.europe2blog.fr/mon_univers/files/_kt_tunstall_black_horse_and_the_cherry_tree.mp3"
songs[13]="http://home.comcast.net/~barahir/secret_maroon5.mp3"
songs[14]="http://ia300839.eu.archive.org/1/items/La_Tortura_1/ShakirayAlejandroSanzLatortura.mp3"
songs[15]="http://nicole-tripp.memory-of.com/Uploads/Audios/Audio632738989688281250.mp3"
songs[16]="http://www.archive.org/download/my_give_a_damn_is_busted/MyGiveADamnsBusted.mp3"
songs[17]="http://files.tagworld.com/242de7616b1efbd9475293aa85648f0d6450.mp3"


//    songs[5]="musicURL";  //
    
    //*******************************//
    //*******************************//

// Initializations //
with (document){
    var length = forms['form'].playlist.length;

    if(numberTracks){
  for (var i = 0; i < length; i++){
      forms['form'].playlist.options[i].innerHTML = (i+1) + " - " + forms['form'].playlist.options[i].innerHTML;
  }
    }
    
    if (shuffle) {
  var randsg = Math.floor(Math.random()*songs.length);
  Player.url = songs[randsg];
  forms['form'].playlist.options[randsg].selected = true;
  forms['form'].ShuffleSwitch.outerHTML = ShuffleOnHTML.innerHTML;
    }

    else {
  forms['form'].ShuffleSwitch.outerHTML = ShuffleOffHTML.innerHTML;
  Player.url = songs[0];
    }

    if(autoStart){
  var snum = forms['form'].playlist.selectedIndex;
  if(Player.url != songs[snum]){
      Player.url = songs[snum];
  }
  Player.controls.Play();
    }
}

// Functions //
// Discription: "PlayPause" will toggle playing and pausing if the same song is still selected,
//              otherwise it will load the newly selected song
function PlayPause(list) {
    var snum = list.selectedIndex;
    
    if((Player.url == songs[snum] && Player.url != "") && Player.playState != 1){
  if(Player.playState == 3){
      Player.controls.Pause();
  }
  
  else {
      Player.controls.Play();
  }
    }

    else {
  Player.url = songs[snum];
  Player.controls.Play();
    }
}

// Discription: "Next" will move to the next music file if shuffle is off
//              otherwise it will load a random song. Calls PlayPause to start music.
function Next(list) {
    var snum = list.selectedIndex;
    if (!shuffle) {
  if (snum == list.length-1) {
      snum = -1;
  }
  snum++;
    }
    
    else {
  var temp;
  do{
      temp = Math.floor(Math.random()*songs.length);
  } while(temp == snum);
  snum = temp;
    }
    
    list.options[snum].selected = true;
    PlayPause(list);
}

// Discription: "Back" does the same thing as "Next" but moves backwads
//              through the list. If shuffle is on then picks a random song.
function Back(list) {
    var snum = list.selectedIndex;
    if (!shuffle) {
  if (snum == 0){
      snum = list.length;
  }
  snum--;
    }
    
    else {
  var temp;
  do{
      temp = Math.floor(Math.random()*songs.length);
  } while(temp == snum);
  snum = temp;
    }
    
    list.options[snum].selected = true;
    PlayPause(list);
}

// Discription: Self explanitory.
function Stop(){
    Player.controls.Stop();
}

// Discription: Makes the shuffle flag the same as the status of the CheckBox
//    The status of the checkbox (true/false) indicates if the box is checked
function ToggleShuffle(CheckBox) {
    shuffle = CheckBox.status;
}

</SCRIPT>

<script ID="StateChangeHandler" Language =" JavaScript" For =" Player" Event = playStateChange(NewState)>

// Description: This is an interupt handler used to handle instances when the
//              state of the player changes to play or stop for example.

//STATE.innerText = NewState;

switch(NewState){
    case 8:  // Handles player after it just finishes playing through a song
  var num = document.forms['form'].playlist.selectedIndex;
    
  if (!shuffle){
      if(num == document.forms['form'].playlist.length-1){
    num = -1;
      }
  
      num++;
  }
  else {
      var temp;
      do{
    temp = Math.floor(Math.random()*songs.length);
      } while(temp == num);
      num = temp;
  }
    
  document.forms['form'].playlist.options[num].selected = true;
    
  PreviousState = NewState;
  break;

    case 1: // Handles player after it stops
  if(PreviousState == 8){
      var num = document.forms['form'].playlist.selectedIndex;
      Player.settings.autoStart = true;
      Player.url = songs[num];
      PreviousState = NewState;
  }
  
  else if (PreviousState != 3 && PreviousState != 2){
      Player.controls.Play();
      Player.settings.autoStart = false;
  }
  
  else{
      forms['form'].PlayPauseButton.innerHTML = PlayHTML.innerHTML;
  }
  break;

    case 3: // Handles player after it starts to play
  PreviousState = NewState;
  forms['form'].PlayPauseButton.innerHTML = PauseButton.innerHTML;
  shuffle = document.forms['form'].ShuffleSwitch.status;
  break;
  
    case 2: // Handles player after being paused
  PreviousState = NewState;
  forms['form'].PlayPauseButton.innerHTML = PlayHTML.innerHTML;
  break;

    default:
}

</SCRIPT>
</center>

 
n00b
post May 18 2006, 09:58 PM
Post #2


Hello My Name Is INSERT HERE
******

Group: Member
Posts: 1,372
Joined: Apr 2006
Member No: 394,903



I'm no pro web designer.
But do you mean in mozilla it will play it just doesn't look right.
Don't worry if your a n00b
{notice my username}
 
TAiNTEDxMEMORiES
post May 19 2006, 07:15 AM
Post #3


Senior Member
***

Group: Member
Posts: 72
Joined: Mar 2006
Member No: 386,570



Lol thanks. But why won't it play in IE? Or is my computer just messed up. ><
 

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