Anyone know of a way to dynamically change the source (src) of an embedded sound using Javascript?
I would like my users to be able to change certain sound effects without having to "embed" the full set of sound effects in a page and without having to reload the page.
Here's how I embed my sounds now:
<embed
id="audioSoundEffect"
name="audioSoundEffect"
src="soundeffect.wav"
hidden="true"
loop="false"
autostart="false">
</embed>
I was thinking along the lines of the following which does not work (IE 6 under Windows 2000):
document.audioSoundEffect.setAttribute('src','
Any ideas?
Thanks!
Malcolm
I would like my users to be able to change certain sound effects without having to "embed" the full set of sound effects in a page and without having to reload the page.
Here's how I embed my sounds now:
<embed
id="audioSoundEffect"
name="audioSoundEffect"
src="soundeffect.wav"
hidden="true"
loop="false"
autostart="false">
</embed>
I was thinking along the lines of the following which does not work (IE 6 under Windows 2000):
document.audioSoundEffect.setAttribute('src','
Any ideas?
Thanks!
Malcolm