M1KES
YaBB Newbies
Offline
Posts: 19
Re: Begginer help on animation
Reply #4 - Sep 29th , 2008, 8:03am
Hey Stephen.. if its not too much to ask.. why doesnt this method work: int x = 0; int y = 10; void setup() { size(100,500); frameRate(9); } void draw() { if( x == 0) { background(255); ellipse(50, 25, 30, 30); line(50, 80, 70, 100); line(50, 80, 30, 100); line(50, 80, 50, 40); line(50, 50, 30, 30); line(50, 50, 70, 30); line(0, 490, 100, 490); x++; } if( x == 1) { background(255); ellipse(50, 55, 30, 30); line(50, 110, 75, 130); line(50, 110, 25, 130); line(50, 110, 50, 70); line(50, 80, 30, 70); line(50, 80, 70, 70); line(0, 490, 100, 490); x++; } if( x == 2) { background(255); ellipse(50, 85, 30, 30); line(50, 140, 80, 150); line(50, 140, 20, 150); line(50, 140, 50, 100); line(50, 110, 30, 110); line(50, 110, 70, 110); line(0, 490, 100, 490); x++; } if( x == 3) { background(255); ellipse(50, 115, 30, 30); line(50, 170, 75, 190); line(50, 170, 25, 190); line(50, 170, 50, 130); line(50, 140, 30, 150); line(50, 140, 70, 150); line(0, 490, 100, 490); x++; } if( x == 4) { background(255); ellipse(50, 145, 30, 30); line(50, 200, 70, 220); line(50, 200, 30, 220); line(50, 200, 50, 160); line(50, 170, 30, 190); line(50, 170, 70, 190); line(0, 490, 100, 490); x++; } if( x == 5) { background(255); ellipse(50, 175, 30, 30); line(50, 230, 65, 250); line(50, 230, 35, 250); line(50, 230, 50, 190); line(50, 200, 30, 210); line(50, 200, 70, 210); line(0, 490, 100, 490); x++; } if( x == 6) { background(255); ellipse(50, 205, 30, 30); line(50, 260, 60, 280); line(50, 260, 40, 280); line(50, 260, 50, 220); line(50, 230, 30, 230); line(50, 230, 70, 230); line(0, 490, 100, 490); x++; } if( x == 7) { background(255); ellipse(50, 235, 30, 30); line(50, 290, 55, 330); line(50, 290, 45, 330); line(50, 290, 50, 250); line(50, 260, 30, 250); line(50, 260, 70, 250); line(0, 490, 100, 490); x++; } if( x == 8) { background(255); ellipse(50, 265, 30, 30); line(50, 320, 60, 340); line(50, 320, 40, 340); line(50, 320, 50, 280); line(50, 290, 30, 270); line(50, 290, 70, 270); line(0, 490, 100, 490); x++; } if( x == 9) { background(255); ellipse(50, 295, 30, 30); line(50, 350, 65, 370); line(50, 350, 35, 370); line(50, 350, 50, 310); line(50, 320, 30, 310); line(50, 320, 70, 310); line(0, 490, 100, 490); x++; } } if(x == y) { x = 0;} }