homepage Welcome to WebmasterWorld Guest from 54.161.155.142
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Netscape 4.8 and Netscape 7.22 not playing sound
Neither browser wants to play a sound via a javascript
grafix




msg:1489162
 2:20 pm on May 22, 2003 (gmt 0)

I used the CountrolSound behavior from Macromedia Dreamweaver 4.0 Ultradev and it was working before in netscape 4.76, but now in netscape 4.8 and Netscape 7.22 the sound will not play.

<SCRIPT LANGUAGE="JavaScript1.2">
<!--
//
IDP={}; IDP[0]=0;
isOvr=0; function OnOver(snd,txc,txv,img,imv,ref,flag){}

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>

Above is the complete script. The script is activated by a link that contains "javascript:MMcontrolSound('play','document.CS1039046370708','fifteen2.wav')"

The sound plays fine in IE and netscape 4.76 but not in the other two browsers. Anyone have any ideas?

The link I used is the only way I can get it to work between netcape 4.76 and IE, if I change it to an onClick event with a "#" link it will not work in any browser.

--
Grafix

 

jeremy goodrich




msg:1489163
 10:54 pm on May 23, 2003 (gmt 0)

Hm, I don't play with sound on my sites - anybody else have some help for this?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved