- Impact
- 5
Okay here is the script I downloaded to add sound to my site. It works but it does not do what I want it to do. I want my mouse over images to make a sound on "mouse over" , and this script put a play button on my page and the play button has the mouse over effect. Please help!!!
This is the script
<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>
<embed name='MM_playSound' src='barcelona_files/hover.wav' loop=false autostart=false mastersound='mastersound' hidden=true volume=100 width=0 height=0></embed>
<a href="#" onmouseover="MM_controlSound('play', 'document.MM_playSound', 'barcelona_files/.wav');">play</a>
This is the result
http://www.geocities.com/tapas_lounge/index3
This is the script
<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>
<embed name='MM_playSound' src='barcelona_files/hover.wav' loop=false autostart=false mastersound='mastersound' hidden=true volume=100 width=0 height=0></embed>
<a href="#" onmouseover="MM_controlSound('play', 'document.MM_playSound', 'barcelona_files/.wav');">play</a>
This is the result
http://www.geocities.com/tapas_lounge/index3








