What code, plugin, is needed to play a simple onmouseover sound in Mozilla
Announcement
Collapse
No announcement yet.
Sound in Mozilla
Collapse
X
-
Flash is reliable. WMP9 and QuickTime should both be able to do it. Probably whatever Real Network call their latest bloatware as well. ...oh, and shockwave, of course.
As for the code, I have no idea, since I never do such things.liorean <[[email protected]]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards
-
Liorean sounds as though he thinks you farted at the Duchess's ball. How common!
Here's my coding which makes a gunshot sound when mouse is over a ship image.
<EMBED src="destroy.wav" hidden="true" autostart="false" name="soundfile2">
<!-- Unspecified JavaScript error is reported if the mouse is over the image when the page loads. Still works OK. This script corrects.
//-->
<SCRIPT language="JavaScript">
var shotcount=0;
function playgunshot() {
if (shotcount > 0) {
document.soundfile2.play();
}
shotcount ++;
}
</SCRIPT>
<p align="center"><a href="#" onMouseOver="playgunshot()"><img src="ship11.gif" width="497" height="125" border="0"></a></p>
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Comment
-
Liorean, Philip M
Thanks for the replys, that code is similar to one that I have tried and works ok in IE but in Mozilla I get no sound at all.
Do I need a plugin of some sort.
Apparently I have Windows Media Player7 running on Windows Millenium, Mozilla version 1.6The silent one.
The most dangerous thing in the world is an idea.
The most dangerous person in the world is the one with an idea.
Comment
Comment