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 & HelpSyntax Questions › Quick questions regarding interactive animation.
Page Index Toggle Pages: 1
Quick questions regarding interactive animation. (Read 328 times)
Quick questions regarding interactive animation.
Apr 21st, 2008, 4:36am
 
I'm completely new to processing. (Should be noted)

I've made a short animation that is controlled by mouseX, within draw is:

if (mouseX<10){
image (frame0,0,0);
}else if ((mouseX>=10) && (mouseX<=20)){
image (frame1,0,0);
}

etc.

Firstly, is there an easier way to do this? If so, could you please take the time to comment the example code thoroughly as my knowledge of the software is extremely limited?

Also, is it possible to vary the animation with the mouse cursor going the opposite direction? (As in, when mouseX is increasing, something happens, but when mouseX decreases, something else happens?)

I hope I explained my problems in enough detail. Any help would be greatly appreciated. Thanks!

Page Index Toggle Pages: 1