xanga music code help, coding |
xanga music code help, coding |
Jun 9 2006, 06:10 PM
Post
#1
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 63 Joined: Dec 2004 Member No: 74,764 |
is there any way to make a new song play when the song playing ends?
like say song a is playing and then it ends and then song b starts playing is there a way to do that? all i need is a condition that tells me when the song ends like if (song ends) { play new song } please help meee |
|
|
|
![]() |
Jun 9 2006, 06:50 PM
Post
#2
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
There's no way to do that because the embed tag doesn't support that feature. If you want it, I suggest you look into a flash player.
|
|
|
|
Jun 9 2006, 06:53 PM
Post
#3
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 63 Joined: Dec 2004 Member No: 74,764 |
are you sure?? cant someone just like look at the code of the "loop" variable? because loop starts the song again when the song ends and there you go :T i dunno
|
|
|
|
Jun 9 2006, 07:02 PM
Post
#4
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
.... What? You can't play a new song (you can get the song to repeat over&over). With my fair Javascript skills, that would require something that you can't do.
[ http://www.createblog.com/scripts/download.php?id=164 ] Perhaps you could mess with that? It dies have this section: CODE //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; |
|
|
|
Jun 9 2006, 10:39 PM
Post
#5
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 63 Joined: Dec 2004 Member No: 74,764 |
newSTATE is the condition for the end of the song?? i dont really get it TT-TT
|
|
|
|
Jun 10 2006, 11:24 AM
Post
#6
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
It tells the player what to do if the song ends. Do you know any Javascript at all?
Then, what's it's saying pretty much boils down to if it's on shuffle-mode it does something different that if it's not on shuffle-mode. And then the old playstate becomes the new one. |
|
|
|
Jun 10 2006, 01:48 PM
Post
#7
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 63 Joined: Dec 2004 Member No: 74,764 |
i know some java script but then i dont need to know what to do after the song ends i need to know how to know when the song ends
|
|
|
|
Jun 10 2006, 09:21 PM
Post
#8
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
That's the thing I was trying to explain earlier. You do need to know what to do the song ends, otherwise how would you switch the song in the first place? Duh. Unless you were going to make it fluid, like a flash player.
If you created an array with song times, you could pull those up depending on the song (having the times match to the music urls array). That would take care of when the song ends. The part that would be hard is the having it switch to a new song. Because I'm not quite sure how the player pulls up the music and plays it in the first place. |
|
|
|
Jun 10 2006, 11:49 PM
Post
#9
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 63 Joined: Dec 2004 Member No: 74,764 |
hmm all true >:] but then it gave me more ideas >:]
yeah the song switching thing would be hard because im using a menu thing. dunno how to change lots of stuff TT-TT too complicated thanks anyways |
|
|
|
![]() ![]() |