scrip compatibility

M

Morris

I used the scrip below. It works on Microsoft Explorer but it dosen't seem
to work in Netscape. I see Nescape in the scrip and I think it should work
with Nescape as well as MS Explorer. Maybe, it was the computer that I was
using which is somtimes iffey. This is the web page that this scrip is on.

http://www.marinemammalstrandingcenter.org/history.htm

Sorry about the fine print but I can't seem to change it eversince I pased
the scrip here.

----------------------------------------------------------------------------
-

<SCRIPT><!--

// MouseOver/MouseClick audio.

// by JS Archive - http://jsarchive.8m.com

var ayAudio = new Array();

// Source for sound files to be preloaded

ayAudio[0] = "media/babyseal.wav";

ayAudio[1] = "media/babyseal.wav";

function AudioCheck() {

var n = navigator.appName

if (n=="Netscape") this.ns = true;

else if (n=="Microsoft Internet Explorer" && document.all) this.ie = true;

else this.noAudio = true;

}

onload = function() {

is = new AudioCheck()

if (is.noAudio) return;

var s = '';

for (i=0; i<ayAudio.length; i++)

s += "<EMBED SRC='"+ayAudio+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"

if (is.ns) {

auEmb = new Layer(0);

with (auEmb.document) { open();write(s);close() };

}

else document.body.insertAdjacentHTML("BeforeEnd",s);

auCon = is.ns? auEmb.document.embeds:auIEEmb;

auCon.ctrl = function(au,play) {

if (is.ie) this.src = play? ayAudio[au]:'';

else eval( "this[au]." + (play? "play()":"stop()") );

}

is.auDone = true;

}

function playAudio(whAu) { if (window.auCon) auCon.ctrl(whAu,1) }

function stopAudio(whAu) { if (window.auCon) auCon.ctrl(whAu,0) }

//--></SCRIPT>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top