PImage imga;
PImage imga2;
PImage imgb;
PImage imgb2;
PImage imgc;
PImage imgd;
PImage imge;
PImage imgf;
PImage imgg;
void setup(){
background(255);
size(400, 400);
frameRate(24);
PFont font;
font= loadFont("ArialMT-60.vlw");
textFont(font);
fill(0);
imga =loadImage("ant.jpg");
imga2= loadImage("finger.jpg");
imgb =loadImage("bear.jpg");
imgb2 =loadImage("tounge.jpg");
imgc =loadImage("cougar.jpg");
imgd =loadImage("deer.jpg");
imge =loadImage("elephant.jpg");
imgf =loadImage("ferret.jpg");
imgg =loadImage("gangster.jpg");
}
void draw(){
background(255);
if ((keyPressed == true) && (key =='a')) {
text("A", 10, 90);
image(imga, 140, 250);
image(imga2, mouseX-90, mouseY-300);
//rect (0, 400, 400);
}
if ((keyPressed == true) && (key =='b')) {
image(imgb, 0, 0);
text("B", 10, 90);
if(mouseX > 200) {
image(imgb2, 130, 200);
tint(255);
}
}
if ((keyPressed == true) && (key =='c')) {
image(imgc, 00, 00, 400, 400);
text("C", 10, 90);
}
if ((keyPressed == true) && (key =='d')) {
image(imgd, 0, 0, 400, 400);
text("D", 10, 90);
}
if ((keyPressed == true) && (key =='e')) {
image(imge, 0, 0, 400,400);
text("E", 10, 90);
}
if ((keyPressed == true) && (key =='f')) {
image(imgf, 0, 0, 400, 400);
text("F", 10, 150);
}
if ((keyPressed == true) && (key =='g')) {
image(imgg, 0, 0, 400, 400);
text("G", 180, 65);
}
}
Alex - F
on Monday, Oct 13, 2008 – 11:26 am
2 Comments
I’m not able to get the program to load.
I think an improvement should be somehow be more coherent with the function of the mouse/interactivity because i’m not clear as to what to do for each letter. maybe the same movement of mouse for every letter.