FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Programs
(Moderators: fry, REAS)
   helo with moving points
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: helo with moving points  (Read 2212 times)
hankey


helo with moving points
« on: Apr 14th, 2005, 7:16am »

hey all,  
 
My name is corey, I am a student at RIT and I was at FiTC   where I found about about processing, and I am new so I was wandering if someone could give me a tip on how to make it so when I draw a shape or point and make it move it doesn't continue to make a line or a line of shapes.  
 
Here is the code.
 
Help Please:
 
----------------
 
int y=250;
void setup(){
  size(500, 500);
  background(125, 152, 200);
  framerate(30);  
  noStroke();
 
}
 
void loop() {
 
  if(mousePressed == true){
    y = y-1;
  }
   
  // draws line of points
   for(int i=1; i < 500; i=i+4){
 
  point(i, y);
 }
 
}
 
-----------------
 
eskimoblood

222550793222550793 WWW
Re: helo with moving points
« Reply #1 on: Apr 14th, 2005, 9:35am »

I think you are looking for this:
 
Code:

void loop() {  
 background(125, 152, 200);  
 .
 .
 .
}
 
hankey


Re: helo with moving points
« Reply #2 on: Apr 14th, 2005, 4:22pm »

Thanks,
 
So basically the backround function you sent me will "clear" the screen everytime the loop executes?
 
 
sorry if I sound dumb, i just want an understanding so I can figure it out.
 
Corey
 
Pages: 1 

« Previous topic | Next topic »