how do I click on an image to go to a different one?
in
Programming Questions
•
5 months ago
I'm new here and I wanna know how do I click on an image (like a button) and it appears a different one (like a new page). This is to do like a 'data file', or like a program that shows me new information when I click on that image (like a web page).
example:
void setup()
{
size(850 ,638);
background(0);
PImage img;
img = loadImage("cortinaanimationfilms2.jpg");
image(img,0,0);
img = loadImage("story2.jpg");
image(img,600,500);
img = loadImage("studio2.jpg");
image(img,200,500);
img = loadImage("year2.jpg");
image(img,400,500);
}
void draw()
{}
-------------------------------------------------------------
I have "cortinaanimationfilms2.jpg" as a background and I wanna click on "story2.jpg" to show me a different page(image). Can you help me please? It's for college and it's kind of urgent...
example:
void setup()
{
size(850 ,638);
background(0);
PImage img;
img = loadImage("cortinaanimationfilms2.jpg");
image(img,0,0);
img = loadImage("story2.jpg");
image(img,600,500);
img = loadImage("studio2.jpg");
image(img,200,500);
img = loadImage("year2.jpg");
image(img,400,500);
}
void draw()
{}
-------------------------------------------------------------
I have "cortinaanimationfilms2.jpg" as a background and I wanna click on "story2.jpg" to show me a different page(image). Can you help me please? It's for college and it's kind of urgent...
1