On Sun, 11 May 2008 21:34:19 +0200, Lasse Reichstein Nielsen
<lr*@hotpop.comwrote:
>Geoff Cox <gc**@freeuk.notcomwrites:
>say I have events numbered 1 to 7 and wish to prevent all except the
current one.
ie
when 1 allowed prevent 2-7
when 2 allowed prevent 1 and 3-7
when 3 allowed prevent 1-2 and 4-7
when 4 allowed prevent 1-3 and 5-7
when 5 allowed prevent 1-4 and 6-7
when 6 allowed prevent 1-5 and 7
when 7 allowed prevent 1-6
how do I do this in Javascript?
if (eventNumber != currentEventNumber) {
disallowEvent();
}
Now, for us to do anything less generic, you should supply more detail.
/L
Lasse,
Thanks for the above - I am using
for (var count=1;count<t;count++){
if (count != t) {
soundManager.stop('mySound'+count);
document.getElementById('IMG'+(count)).src=played2 .src;
}
}
Which doesn't quite work as it stops counting up once the count is not
equal to t. How do I make the count continue?
Cheers
Geoff