I want the image to change each time the key is pressed. Change to onyd1.png the first time, and onyd2.png the second time, and later onyd3.png, onyd4.png, ect. It only changes to onyd2.png currently.
I want each stroke to advance to the next image.
document.onkeyup = function(event) {
if(event.keyCode === 13) {
ony.style.backgroundImage="url(onyd1.png)"
}
if(event.keyCode === 13) {
ony.style.backgroundImage="url(onyd2.png)"
}
}
if you have a maximum number of images you may want to modify as follows: