P
paul.sherwood
Hi
Ive made a game for babies that simply displays one of an array of
pictures of animals along with there sound each time the keyboard is
'bashed'.
at the moment i dynamically load pictures using
<img id="image" src="somepic.gif" alt="" border=0px/>
<script type="text/javascript">
document.onkeyup=changeImageSrc;
</script>
and
function changeImageSrc(){
..
..
document.getElementById('image').src = nextImage; //nextImage is
already loaded from the image array
}
This works great for adults. However babies dont tend to wait for the
image and sound to have played before bashing again, so lots of keyup
events come along and the page ends up being a blur of images and
sounds. How might i best remedy this issue?
thanks in advance
Paul
Ive made a game for babies that simply displays one of an array of
pictures of animals along with there sound each time the keyboard is
'bashed'.
at the moment i dynamically load pictures using
<img id="image" src="somepic.gif" alt="" border=0px/>
<script type="text/javascript">
document.onkeyup=changeImageSrc;
</script>
and
function changeImageSrc(){
..
..
document.getElementById('image').src = nextImage; //nextImage is
already loaded from the image array
}
This works great for adults. However babies dont tend to wait for the
image and sound to have played before bashing again, so lots of keyup
events come along and the page ends up being a blur of images and
sounds. How might i best remedy this issue?
thanks in advance
Paul