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 › basic program
Page Index Toggle Pages: 1
basic program (Read 372 times)
basic program
Sep 24th, 2008, 9:54am
 
was just curious if anyone was able to help me with a problem im having. I have loaded up my background, and was wondering if a certain position of the image is clicked, i would be able to load up another image.I know this is simple, but i havent been able to figure it out.
Thank you for any help.
Re: basic program
Reply #1 - Sep 24th, 2008, 2:18pm
 
You have to handle the mouseClicked() event, and there check the mouseX and mouseY values (coordinates of mouse click) against the wanted area.
If so, load your image.

I don't know if I must give more precise information...
Page Index Toggle Pages: 1