islandjohnny said:
I saw a web site that with a click of the mouse on a graphic, it either
turned on background music, or turned it off. I was wondering if Frontpage
2003 offered that feature and if do, how?
FrontPage itself does not, but here is some simple code to do it
Insert this code, using Code or HTML view, where you want the button:
<span id="sound"></span>
<input type="button" value="Play/Stop
Music"
onclick="playSound('audio/minuet.mid')"/>
Insert this JavaScript, using Code or HTML view, between <head> and
</head>:
<script type="text/javascript">
function playSound(fname)
{
var x = document.getElementById("sound")
x.innerHTML = (!x.innerHTML ) ? '<embed src="' + fname + '" loop=false
autostart=true hidden>' : ''
}
</script>
The function will play or stop the music on alternate clicks.
Notes:
1. Change the name of the file in "playSound('audio/minuet.mid')" to your
file
2. Some of the quotes are single and some are double. Just cut and paste the
code above to get it right.