Jump to content


Photo

go to new page on when song is done....?


  • Please log in to reply
6 replies to this topic

#1 zhahaman2001

zhahaman2001
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 23 October 2006 - 12:57 AM

ok i have a page that has a song on it

<embed volume=100 src=song1.mp3 width=300 height=45 autostart=true loop=FALSE></embed>

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 ?

#2 Design

Design
  • Members
  • PipPipPip
  • Advanced Member
  • 45 posts
  • LocationThe Computer Chair

Posted 23 October 2006 - 03:28 AM

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

#3 zhahaman2001

zhahaman2001
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 23 October 2006 - 03:50 AM

thats no good what if they pause the song....?

#4 zhahaman2001

zhahaman2001
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 23 October 2006 - 01:12 PM

isnt there another way?

#5 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 24 October 2006 - 02:55 AM

It's possible that the EMBED tag (which, btw, should be OBJECT) has methods than can be queried, or handlers that can be added.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#6 Design

Design
  • Members
  • PipPipPip
  • Advanced Member
  • 45 posts
  • LocationThe Computer Chair

Posted 25 October 2006 - 02:07 AM

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.

#7 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 26 October 2006 - 05:12 PM

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.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users