Click to See Complete Forum and Search --> : File mp3, to stop the background music


Dukaduka
10-14-2003, 01:53 PM
Hello,

How do you do to let the possibility at the user to listen or not the musical file. We would like that the user listen the music in background when he opens the site.

Wešve got a mp3 file on Dreamwaver.

Please, can someone help us?

Thank you,
Umberto and Douchka

alcodes
10-16-2003, 09:59 AM
I think I know what you meen, you want just the MP3 to play, no stopping? or stopping as well, here is some code that will allow the user to stop the MP3 and restart it:
<embed src="CHANGE ME.mp3" loop="true" autostart="true" name="music"></embed>
<input type="button" onclick="music.src=''" value="Stop Music">
<input type="button" onclick="music.src='CHANGE ME.mp3'" value="Stop Music">

Im not too sure that code works in all browsers, I know it works in IE 5+ and NS 7.1, also, dont try to put the music.src into a function, it wont work too well