The function mouseOverRect() does not exist.
in
Core Library Questions
•
1 year ago
Hi,
While trying to run the following code I get the error
I can't see any errors. Line 12 seems correct to me.
Thanks,
Shane
While trying to run the following code I get the error
The function mouseOverRect() does not exist.
- import processing.serial.*;
- Serial port;
- void setup() {
- size(200, 200);
- noStroke();
- frameRate(10);
- port = new Serial(this, 9600);
- }
- void draw() {
- background(255);
- if (mouseOverRect() == true) {
- fill(204);
- myPort.write('H');
- }
- else {
- fill(0);
- myPort.write('L');
- }
- rect(50, 50, 100, 100);
- }
I can't see any errors. Line 12 seems correct to me.
Thanks,
Shane
1