I
Ivo
Hi,
I have an audio file (.mid or .wav or .mp3) in an object element:
<object id="snd" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.
cab#Version=5,1,52,701" type="application/x-oleobject" width="282"
height="53">
<param name="FileName" value="Tjaikovsky_-_The_sorcerers_apprentice.mid" />
<param name="loop" value="true" />
<... more presentational params ...>
<embed name="embsnd" src="Tjaikovsky_-_The_sorcerers_apprentice.mid"
width="280" height="53" controls="smallconsole" autostart="true"
loop="true"></embed>
</object>
and a checkbox with which I would like to toggle the looping behaviour of
said object:
<label for="chloop">Loop:</label><input type="checkbox" id="chloop"
onclick="toggleloop(this);" class="zm" checked>
However, the sound keeps looping whatever I put in the toggle function:
function toggleloop(el){
document.getElementById('snd').PlayCount=el.checked?99:1;
document.getElementById('snd').PlayCount=el.checked?0:1;
document.getElementById('snd').loop=el.checked?99:1;
document.getElementById('snd').loop=el.checked?0:1;
document.embeds.embsnd.loop=el.checked?99:1;
document.embeds.embsnd.loop=el.checked;
...??
}
Resources on the web speak of embedding sounds into webpages in many ways,
but none I have found that discuss this particular issue. I hope someone
easily
spots my error.
I have an audio file (.mid or .wav or .mp3) in an object element:
<object id="snd" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.
cab#Version=5,1,52,701" type="application/x-oleobject" width="282"
height="53">
<param name="FileName" value="Tjaikovsky_-_The_sorcerers_apprentice.mid" />
<param name="loop" value="true" />
<... more presentational params ...>
<embed name="embsnd" src="Tjaikovsky_-_The_sorcerers_apprentice.mid"
width="280" height="53" controls="smallconsole" autostart="true"
loop="true"></embed>
</object>
and a checkbox with which I would like to toggle the looping behaviour of
said object:
<label for="chloop">Loop:</label><input type="checkbox" id="chloop"
onclick="toggleloop(this);" class="zm" checked>
However, the sound keeps looping whatever I put in the toggle function:
function toggleloop(el){
document.getElementById('snd').PlayCount=el.checked?99:1;
document.getElementById('snd').PlayCount=el.checked?0:1;
document.getElementById('snd').loop=el.checked?99:1;
document.getElementById('snd').loop=el.checked?0:1;
document.embeds.embsnd.loop=el.checked?99:1;
document.embeds.embsnd.loop=el.checked;
...??
}
Resources on the web speak of embedding sounds into webpages in many ways,
but none I have found that discuss this particular issue. I hope someone
easily
spots my error.