/    Sign up×
Community /Pin to ProfileBookmark

Problem with playing sound on mouseover-Netscape 7

I’d like a small .wav file to play on mouseover of an image. IE is easy, it’s Netscape 7 I can’t get to work. I figured out that this script (below) isn’t working because I don’t have the LiveAudio plugin. However, I installed Netscape with the “Typical” option, so I’m guessing that LiveAudio is not part of the standard install anymore? Is this script out of date? I don’t want to use a technique that won’t work for the vast majority of Netscape users! If anyone can help with this I’d really appreciate it.

<script language=”JavaScript”>
<!–
ver=parseInt(navigator.appVersion);
ie4=(ver>3 && navigator.appName!=”Netscape”)?1:0
ns4=(ver>3 && navigator.appName==”Netscape” && navigator.plugins[“LiveAudio”])?1:0
ns3=(ver==3 && navigator.appName==”Netscape” && navigator.plugins[“LiveAudio”])?1:0

var audioOn = false;
function playSound() {
if (ie4) document.all[‘BGSOUND_ID’].src=’Snap.wav’;
if ((ns4||ns3))
{
var thissound=document.Snap;
if (audioOn) {
thissound.Play();
}

}
}
//–>
</script>
</head>

<body bgcolor=”#FFFFFF” text=”#000000″ onLoad=”javascript:audioOn=true”>
<a href=”” onMouseOver=”playSound()”><img name=”photoa” src=”images/camera.jpg” width=92 height=72 border=0></a>

<BGSOUND id=BGSOUND_ID src=””>
<EMBED name=”Snap” src=Snap.wav hidden=”true” width=”0″ height=”0″ AUTOSTART=”FALSE” LOOP=”FALSE” autorewind=”true” enablejavascript=”true” mastersound>
</EMBED>
</body>
?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisAug 30.2004 — Netscape, in their infinite wisdom, killed LiveConnect when they released version 6. They also rewrote all their plug-in code so that none of the older version 4 stuff would work. In fact, even the MediaPlayer plug-in won't work on 6 or 7.

I think that WinAmp has NS 7 support.
Copy linkTweet thisAlerts:
@scoopauthorAug 30.2004 — Thanks so much for the explanation. Do you know if they have a function similar to "Play()" that is supported with the new version? Or any other way to play sound on mouseover with Netscape now?
Copy linkTweet thisAlerts:
@gil_davisAug 30.2004 — This link shows how to use ActiveX and MediaPlayer in NS 7.1:

http://devedge.netscape.com/viewsource/2003/windows-media-in-netscape/
×

Success!

Help @scoop spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...