zhahaman2001 Posted October 23, 2006 Share Posted October 23, 2006 ok i have a page that has a song on it [code]<embed volume=100 src=song1.mp3 width=300 height=45 autostart=true loop=FALSE></embed>[/code]and i want it so when the song is done playing (it got to the end) that it loads a new page (in the same window) ......so this page is song.php and when the song is done i want it to go to song.php?songdone=true how would i do that ? Quote Link to comment Share on other sites More sharing options...
Design Posted October 23, 2006 Share Posted October 23, 2006 my best suggestion is that you open the song in a player, find out EXACTLY how many seconds long it is, then use a window.location = song.php function to redirect the page, and set the body to onload=setTimeOut(xxxx('redirect()'), xxxx being the time(in milliseconds) of the song. This is done using javascript, btw Quote Link to comment Share on other sites More sharing options...
zhahaman2001 Posted October 23, 2006 Author Share Posted October 23, 2006 thats no good what if they pause the song....? Quote Link to comment Share on other sites More sharing options...
zhahaman2001 Posted October 23, 2006 Author Share Posted October 23, 2006 isnt there another way? Quote Link to comment Share on other sites More sharing options...
fenway Posted October 24, 2006 Share Posted October 24, 2006 It's possible that the EMBED tag (which, btw, should be OBJECT) has methods than can be queried, or handlers that can be added. Quote Link to comment Share on other sites More sharing options...
Design Posted October 25, 2006 Share Posted October 25, 2006 well, with my method, you could make a javascript counter or something that counts down or up until the end of the song, when the user presses the 'pause' button, have the counter stop also. once the counter hits a certain number(the end of the song), have it go to the new page.By the way, if you wanna find out the song exact song length, just convert the file type of the song to .WAV, and open it up in the sound recorder program. Quote Link to comment Share on other sites More sharing options...
fenway Posted October 26, 2006 Share Posted October 26, 2006 Timeouts won't be useful, since there's loading time you can't account for, plus other delays... I'm assuming there are onload / onfinish or related methods. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.