kwhubby
12-08-2002, 08:56 AM
I have found wierd errors when using this in scripts (explo being an embed object) :
document.getElementById("explo").stop()
document.getElementById("explo").play()
with this too in body (<embed id="explo" width="0" height="0" autostart="false" loop="false" src="explode.wav">)
it works fine on most machines and IE browsers, but sometimes a computer wont like it, one strange example was were 2 machines, both with xp, and IE 6, differed in its response to that script, one played the sound, and the other gave an error. Is there a way to fix this problem, or at least to determine if it works on the machine using the script and to deactivate it if it wont work? is it simply:
if (document.getElementById("explo").play()) {
document.getElementById("explo").stop()
document.getElementById("explo").play()
}
document.getElementById("explo").stop()
document.getElementById("explo").play()
with this too in body (<embed id="explo" width="0" height="0" autostart="false" loop="false" src="explode.wav">)
it works fine on most machines and IE browsers, but sometimes a computer wont like it, one strange example was were 2 machines, both with xp, and IE 6, differed in its response to that script, one played the sound, and the other gave an error. Is there a way to fix this problem, or at least to determine if it works on the machine using the script and to deactivate it if it wont work? is it simply:
if (document.getElementById("explo").play()) {
document.getElementById("explo").stop()
document.getElementById("explo").play()
}