Loading...
Logo
Processing Forum
Hi, i wanna do something like this :


This is my code : 
Copy code
  1. SpotLine mySpotL;

  2. void setup  () {

  3.   size ( 600, 900);
  4.   smooth ();

  5.   mySpotL  = new SpotLine();
  6. }




  7. void draw () {
  8.   background (0);


  9.   mySpotL.display ();
  10. }
  11. Class SpotLine {
  12. // global vars

  13. float x = 0,
  14. float y = 0,

  15. // constructor

  16. SpotLine (){


  17. }






  18. // Functions

  19. void display (){

  20. for ( int i = width/30 ; i<width ; i+=width/30 ){
  21.   ellipse ( i , 20 , 30,30 );



  22. }









  23. }

any ideas ?

thanx !


Noise is king

Replies(1)

Lot's of errors...

For your first error (Unexpected Token: SpotLine) it's because you have Class instead of class. Processing is case-sensitive.
The next two are from lack of semicolons on lines 25 and 26, and the last one can be fixed by adding another } character to the end.

Overall, you should try to write neater code.
For right now, though - Edit > Auto Format !!!