Hi
Could anyone help me with this.
I want musik to be played when "onMouseOver" a link and the
musik should stop when "onMouseOut".
The code I did here below work but when I do "onMouseOut"
I start a where short empty midi-file , to stop the first one.
Couldn't I just stop the first one without start another,
and how?
And what does the parameter "mastersound" in embed tag do?
Without this it doesn't work at all?
Thank you in advanced / Pelle Sweden
(I want to give this question more points but thats all I have)
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
function start() { document.on.play()}
function stopp() { document.off.play()}
</SCRIPT>
<BODY>
<EMBED NAME="on" SRC="musik2.mid" HIDDEN=true AUTOSTART=false mastersound></EMBED>
<EMBED NAME="off" SRC="kort.mid" HIDDEN=true AUTOSTART=false mastersound></EMBED>
<A HREF="javascript:void(0)"
onMouseover="start()"
onMouseOut="stopp()">Music On/Off</A>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
function start()
{
document.the-name.play(fal
}
function stop()
{
document.the-name.play(tru
}
</SCRIPT>
<BODY>
<EMBED SRC="filename.wav" HIDDEN=TRUE AUTOSTART=FALSE NAME="the-name" MASTERSOUND>
<a href="your-link.html"
onMouseover="JavaScript:st
onMouseout="JavaScript:sto
</BODY>
</HTML>
This simply changes the play property of the embedded sound when your mouse goes over the link.
Hope this helps