We are about to switch to a new forum software. Until then we have removed the registration on this forum.
//// Wild circles #2.
String title= "Click for another circle.";
String subtitle= "Press any key to erase.";
String author= "Bruce Alan Martin";
text("Hello", 30, 30);
// GLOBAL VARIABLES //
float x,y;
int h,w;
// Setup: screen size, initialization. //
void setup() {
size(500, 500);
x= width/2;
y= height/2;
w= 80; // width of ellipse.
h= 80; // height of ellipse
}
// Next frame. //
void draw() {
text( title, 10, 10 );
text( subtitle, width/2, 10 );
text( author, 10, height-10 );
text( w+"x"+h, width/2,height-10 );
//
ellipse(x, y, w, h);
}
// Handle mouse clicks //
void mousePressed() {
x= mouseX;
y= mouseY;
}
// Handle keyboard //
void keyPressed() {
// Erase everything, change size & color. //
background( random(255), random(255), random(255) );
fill( random(255), random(255), random(255) );
w= int( random(50,150) );
h= int( random(50,150) );
}
Answers
please read sticky post how to format code
go back and edit your post
I get the messages "you're mixing active and static modes," and "syntax error on tokens delete these tokens" which refers to the line text ("Hello", 30, 30);
line 6 is outside of any method.
move it after line 23 and you'll see it.
Okay, so I moved it within the method of void draw and it still has a problem with the token "30"... is there a problem with those parameters or is it something else?
works ok here. please double-check.
Is this what you did? Can you copy and paste your example?
Line 22 should read
I changed the order of the second " and the first , .
Thank you! :) now I have a different problem of course lol.