Log In · Register

 
playlist issues, something wrong with code
TheYellowDart_06
post 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 -->
 
 
Start new topic
Replies (1 - 9)
lbjshaq2345
post Sep 5 2005, 04:55 PM
Post #2


Lil JC
*****

Group: Member
Posts: 868
Joined: May 2005
Member No: 145,741



umm ok thats the weirdest code i've ever seen umm could u paste the whole code up here but using a codebox

jus put the code between these tags

CODE
 
TheYellowDart_06
post Sep 5 2005, 04:58 PM
Post #3


Newbie
*

Group: Member
Posts: 5
Joined: Sep 2005
Member No: 226,670



 
Kenado
post Sep 5 2005, 05:00 PM
Post #4


Senior Member
*******

Group: Member
Posts: 3,551
Joined: Feb 2005
Member No: 102,857



Here just use this I redid your playlist.
 
TheYellowDart_06
post Sep 5 2005, 05:23 PM
Post #5


Newbie
*

Group: Member
Posts: 5
Joined: Sep 2005
Member No: 226,670



I must be doing something incorrectly. I put in that new code ^ and I'm still having the same problem. I feel like a moron because I know you guys know what you're talking about, but for some reason, I just can not get this to work. The location of the player in the 'Website Stats' box doesn't matter does it? I have several other blocks of code there and the media player is the last one, do you think that has any affect? Obviously, all of my ideas are exhausted! Thanks even if you guys can't help me though!
 
Kenado
post Sep 5 2005, 05:24 PM
Post #6


Senior Member
*******

Group: Member
Posts: 3,551
Joined: Feb 2005
Member No: 102,857



Oh yeah hmmmm something is definately effecting it can you post all of your codes up header and websitestats?
 
TheYellowDart_06
post Sep 5 2005, 05:30 PM
Post #7


Newbie
*

Group: Member
Posts: 5
Joined: Sep 2005
Member No: 226,670



I forget what each block of code even does anymore. But here it all is.

 
Kenado
post Sep 5 2005, 05:39 PM
Post #8


Senior Member
*******

Group: Member
Posts: 3,551
Joined: Feb 2005
Member No: 102,857



Well I took out this part of the code.



And your playlist is fine, but I'm not sure if that code is quite important or not is it?
 
TheYellowDart_06
post Sep 5 2005, 05:48 PM
Post #9


Newbie
*

Group: Member
Posts: 5
Joined: Sep 2005
Member No: 226,670



Yea, I didn't need that block of code, though it did create a pretty cool effect. Thanks a million, that was a lot of code to review, and you did it so quickly. It works now! Thanks again!!
 
hi-C
post Sep 5 2005, 06:18 PM
Post #10


Amberific.
********

Group: Staff Alumni
Posts: 12,913
Joined: Jul 2004
Member No: 29,772



Topic closed
 

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