xxxxxxxxxx
let counter=0;
function preload() {
E1 = loadImage("E1_new.png");
D = loadImage("D_new.png");
G = loadImage("G_new.png");
E2 = loadImage("E2_new.png");
sound = loadSound('Typing.mp3');
}
function setup() {
createCanvas(windowWidth, windowHeight);
background(255);
sound.setVolume(1);
sound.loop();
}
function draw() {
if (counter==10)
image(E1, windowWidth*(1/5)-75, windowHeight/2-75, 150, 150);
if (counter==20)
image(D, (windowWidth*(1/5))*2-75, windowHeight/2-75, 150, 150);
if (counter==30)
image(G, (windowWidth*(1/5))*3-75, windowHeight/2-75, 150, 150);
if (counter==40)
image(E2, (windowWidth*(1/5))*4-75, windowHeight/2-75, 150, 150);
if (counter==50){
noStroke();
fill(255);
rect((windowWidth*(1/5))*4-75, windowHeight/2-75, 150, 150);}
if (counter==55)
image(E2, (windowWidth*(1/5))*4+30, windowHeight/2+30, 150, 150);
if (counter==60){
noStroke();
fill(255);
rect((windowWidth*(1/5))*4+30, windowHeight/2+30, 150, 150);}
if (counter==65)
image(E2, (windowWidth*(1/5))*4+150, windowHeight/2+150, 150, 150);
counter++;
if (counter==75){counter=0; createCanvas(windowWidth, windowHeight);
background(255);}
}