Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
shuming.huang
shuming.huang's Profile
1
Posts
2
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
How do I use keyPressed to control the screen?
[7 Replies]
13-Nov-2012 10:27 AM
Forum:
Programming Questions
Hello,
I am trying to write a program with using keyPressed.
My idea is the cubes on the screen would break and fall apart one press any keys on the key board.
How should I continue from here.
void setup() {
stroke(1);
size (500, 450);}
void draw() {
//frameRate (5);
for (int y=0;y<500;y+=20){
for(int x=0;x<500;x+=20){
fill((x+y+10)*0.2,120,100);
rect(x,y,25,25);
}
}
if (keyPressed ==true) {
}
}
thanks in advance.
SH
«Prev
Next »
Moderate user : shuming.huang
Forum