suave design
05-16-2011, 09:09 AM
I am trying to add sound to my website, on mouse-click.
I am using Dreamweaver. I went to Behaviors, and clicked "play sound", and chose a sound to play. I have this sound in my local folder, and Dreamweaver inserted it into my code, right after a link.
But the sound does not play when I test it!
Please help asap....
Thanks.
(the link to my site is www.trecall.com.)
here is the html code:
<li><a href="smart_pay.html" onClick="MM_controlSound('play','document.CS1305532951843','Swoosh 3-SoundBible.com-1573211927.wav')">Smart Pay</a></li>- this is the code for the mouse-click.
And this is the code that dreamweaver inserted into the <head>:
<script type="text/javascript">
<!--
function MM_controlSound(x, _sndObj, sndFile) { //v3.0
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>
I am using Dreamweaver. I went to Behaviors, and clicked "play sound", and chose a sound to play. I have this sound in my local folder, and Dreamweaver inserted it into my code, right after a link.
But the sound does not play when I test it!
Please help asap....
Thanks.
(the link to my site is www.trecall.com.)
here is the html code:
<li><a href="smart_pay.html" onClick="MM_controlSound('play','document.CS1305532951843','Swoosh 3-SoundBible.com-1573211927.wav')">Smart Pay</a></li>- this is the code for the mouse-click.
And this is the code that dreamweaver inserted into the <head>:
<script type="text/javascript">
<!--
function MM_controlSound(x, _sndObj, sndFile) { //v3.0
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>