xxxxxxxxxx
var lilo;
var stitch;
function preload(){
lilo = loadImage('lilo.png');
stitch = loadImage('stitch.png');
} // end preload
function setup() {
createCanvas(600,600)
imageMode(CENTER);
image_number=1;
} //end set up
function draw() {
background(0);
circle(width/2,height/2,200);
if(image_number == 1){
image(lilo,300,300,100,150);
}
if(image_number == 2){
image(stitch,300,300,100,100);
}
} // end draw
function keyTyped(){
if(key == '1'){
image_number = 1;
}
if(key == '2'){
image_number = 2;
}
} // end keyTyped