I’m fairly new at HTML, i created a link to where when you moused over it, it would play a .wav file, only problem with this is it opens up the Realone player instead of just playing from the browser. Is there a way i can make my browser play the file instead of one of my players?
heres my script…
<head>
<Script>
function MM_controlSound(x, _sndObj, sndFile) {
var i, method = “”, sndObj = eval(_sndObj);
if (sndObj != null) {
if (navigator.appName == ‘Netscape’) method = “play”;
else {
if (window.MM_WMP == null) {
window.MM_WMP = false;
for(i in sndObj) if (i == “ActiveMovie”) {
window.MM_WMP = true; break;
} }
if (window.MM_WMP) method = “play”;
else if (sndObj.FileName) method = “run”;
} }
if (method) eval(_sndObj+"."+method+"()");
else window.location = sndFile;
}
</Script>
<!-- End Sound Link -->
</head>
<body>
<embed name=‘MM_playSound’ src=‘music/homepage.wav’ loop=false autostart=false mastersound=‘mastersound’ hidden=true volume=100 width=0 height=0></embed>
<a href=“homepage.html” onmouseover=“MM_controlSound(‘play’, ‘document.MM_playSound’, ‘music/homepage.wav’);”>Home</a>
- thanks