playlist issues, something wrong with code |
playlist issues, something wrong with code |
Sep 5 2005, 04:52 PM
Post
#1
|
|
|
Newbie ![]() Group: Member Posts: 5 Joined: Sep 2005 Member No: 226,670 |
Ok, I suddenly have a problem with my player on my Xanga. I added a few more songs today to my playlist, no big deal, I change it all the time; but something went terribly wrong and I'm not sure how. I believe it must be something wrong with the last few lines of code, seeing as how they show up at the bottom of my Xanga page now. I've noticed that the player no longer automatically plays the next song (whether the shuffle is on or off) as it formerly did. I know hardly anything about coding, so any help on this issue would be greatly appreciated. Below is my page, and below that is the block of code I'm having problems with. I believe the error in the code is isolated in that chunk, but if needed, I can paste the entire media player code on here
My Webpage // 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 = "Pause"; 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> <!-- end code provided by createblog.com --> |
|
|
|
TheYellowDart_06 playlist issues Sep 5 2005, 04:52 PM
lbjshaq2345 umm ok thats the weirdest code i've ever seen ... Sep 5 2005, 04:55 PM
TheYellowDart_06 <!-- begin code provided by createblog.com... Sep 5 2005, 04:58 PM
Kenado Here just use this I redid your playlist.
<OB... Sep 5 2005, 05:00 PM
TheYellowDart_06 I must be doing something incorrectly. I put in t... Sep 5 2005, 05:23 PM
Kenado Oh yeah hmmmm something is definately effecting it... Sep 5 2005, 05:24 PM
TheYellowDart_06 I forget what each block of code even does anymore... Sep 5 2005, 05:30 PM
Kenado Well I took out this part of the code.
<... Sep 5 2005, 05:39 PM
TheYellowDart_06 Yea, I didn't need that block of code, though ... Sep 5 2005, 05:48 PM
Madame C Topic closed Sep 5 2005, 06:18 PM![]() ![]() |