We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Mouse clicks
Page Index Toggle Pages: 1
Mouse clicks (Read 547 times)
Mouse clicks
Oct 19th, 2007, 8:06am
 
I want to do a click on the link, and that is using the mouse click on the current picture can be connected to another picture, but how can we live by clicking on the images connect to another picture? ? How will we be able to click on pictures added to the present? ? Very nervous ah! Hope we help! Thank you!
Re: Mouse clicks
Reply #1 - Oct 19th, 2007, 11:04am
 
so, you have an image that should change to another one from the net after it has been clicked?

make an array for the links:

PImage img;  // current image
String[] lnks;  // all links
int cimg = 0;  // pointer

void setup () {
  // ..
  lnks = new String[] {
"http://processing.org/img/processing_beta.gif"
// ...
};
  img = loadImage( lnks[cimg] );
 // ..
}

// ...

now once the image was clicked increment the pointer (make sure it is < lnks.length ) and load the next image ..

F
Page Index Toggle Pages: 1