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.
Page Index Toggle Pages: 1
Scrolling Right (Read 510 times)
Scrolling Right
Dec 2nd, 2009, 12:41pm
 
I apologize if this is elsewhere, but i cant find it anywhere.

How would you go about setting up a constant scrolling to the right, like in this visualizer... vimeo.com/2924262

I have tried writing to arrays, and subtracting one off the x position each round through draw, but then it happens too fast.

Thanks.
Re: Scrolling Right
Reply #1 - Dec 2nd, 2009, 1:56pm
 
dont know how the programm is made, but i can tell you how i would do it. create a class of the effects you just saw and give them a x coordinate that is count down. if the x coodinate is offscreen, remove the class. This could be achieved using an arraylist.
take a look at this example :
http://processing.org/learning/topics/arraylistclass.html

the speed how fast you count down your x variable could then be adjusted to the speed you want them to move.

Re: Scrolling Right
Reply #2 - Dec 2nd, 2009, 3:44pm
 
Fantastic.

Thank you so much for your help.
Page Index Toggle Pages: 1