Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback: irt.org FAQ Knowledge Base Q1223

Feedback on: irt.org FAQ Knowledge Base Q1223

Sent by B De Roes on July 30, 2000 at 21:39:12: - feedback #1555

Worth:
Very worth reading

Comments:
after much experimentation, I finally got this to work in IE5.5 with the following additions/changes to the code:

you need this from Q485:
var can_play = true; var mimetype = 'audio/midi';

and instead of this line in PlaySound:
document.embeds[soundName].run();
you need:
document.embeds["sound"+idx].play();
which means you don't need the if test for Navigator.

I also had to hardcode the preload of my midi files, because the first 'if' did nothing.


Sent by peter van rees on October 15, 2000 at 17:58:30: - feedback #1867

Worth:
Very worth reading

Comments:
The <script> is not ended in the this specific code. But other than this, it still doesn't work.

Could you perhaps tell me how the sound and the image files should be called? For example (for the first image and sound):

sound1.wav
img1.gif
img1on.gif
img1off.gif

Just can't figure out why it doesn't work.

t.i.a.,
peter



Sent by Shibu Nair on June 29, 2001 at 01:03:26: - feedback #2920

Length:
Too long

Comments:
Hello., The Below code works in Both IE and Netscape.

<script language="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>
<a href="anklet.htm" onMouseOut="ChangeImageOver('l1')" onMouseOver="ChangeImage('l1');MM_controlSound('play','document.CS993792961750','Laser.wav')">
<body>

</body>


©2018 Martin Webb