hi there!
i dont have a lot of experience with javascript and im trying to create a script where keystrokes will change the image being presented. Currently i have a code that works with the input being text, but i want to change this so that what you see are images, one after the other, that change according to if you correct the right button.
For example:
If you see an image of a bird, press the key "A" (if the A key is pressed, then the next image is shown)

This is what i have so far. Someone please help!


to summarize, i would like to replace the words "horrible", "happy" etc. with pictures.





function(o)
{ //v1.0 for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); return o;}

document.onkeyup = KeyCheck;


var img = new Array();
var correct = new Array();
var neworder = shuffle([0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15]);

var t = 0;var c = 0;var d;var running = 0;

img[0]="Horrible"; correct[0]=76;
img[1]="Nasty"; correct[1]=76;
img[2]="Awful"; correct[2]=76;
img[3]="Terrible"; correct[3]=76;
img[4]="Agony"; correct[4]=76;
img[5]="Hurt"; correct[5]=76;
img[6]="Evil"; correct[6]=76;
img[7]="Failure"; correct[7]=76;

img[8]="Happy"; correct[8]=65;
img[9]="Beautiful"; correct[9]=65;
img[10]="Laughter"; correct[10]=65;
img[11]="Pleasure"; correct[11]=65;
img[12]="Joy"; correct[12]=65;
img[13]="Wonderful"; correct[13]=65;
img[14]="Smile"; correct[14]=65;
img[15]="Glorious"; correct[15]=65;





THANK YOU SO MUCH!