(Hi, I’m relatively new to processing and I’ve searched around for an answer but haven’t found anything regarding this besides making the image disappear for a moment)
I’m trying to remove permanently (or hide) one image in front of another by clicking on it.
My current code CODE:
PImage bgImg;
PImage bgImg2;
PImage bgImg3;
PImage bgImg4;
void setup() {
noLoop();
size(1220,800, P2D);
// Images must be in the “data” directory to load correctly
bgImg = loadImage(“background.jpg”);
bgImg2 = loadImage(“background2.jpg”);
bgImg3 = loadImage(“background3.jpeg”);
bgImg4 = loadImage(“background4.jpg”);
}
void draw() {
image(bgImg, 0, 0, width/2, height/2);
image(bgImg2, 0, 0, width/2, height/2);
image(bgImg3, 600, 0, width/2, height/2);
image(bgImg4, 600, 0, width/2, height/2);
}