Unfortunately when trying to publish the post I got an error message that the post exceeds the 30,000 character limit. the idea of this very forum is to share code...
I tried to run a sketch found
here. Unfortunately I get this error: 'Cannot find a class or type named reference'. I understand that this particular issue and changes in Processing stop the sketch working but how can I fix it then? I cannot paste the code cause it exceeds the forums maximum character limit... zoho, you bitch.
I'm using Processing 2.0a3 on Snow Leopard (Mac OS X). Recently I installed Eclipse and updated the ADK. I wonder if this is the reason for this error message? How can I fix it?
I'm trying to create an array of interactive button objects. So far I created an array of the class and it works almost perfectly, except the buttons' behaviour. When they're clicked, they're supposed to change their color to give a feedback that a button is pressed. Instead, different buttons change their color instead of the one clicked. I cannot make sense of it... Also, I wonder how can I create a for loop to iterate the x and y variables for the position of button, rather than having to enter them manually.
I'm trying to build an application to send and receive OSC messages. I built a class of buttons and the idea is that if a formatted message ("name"+id+string, such as: name 2 Harrold) is received, the class checks the id and names the buttons accordingly. Unfortunately I get error with this code in the class constructor.
import oscP5.*;
import netP5.*;
OscP5 oscP5;
NetAddress myRemoteLocation;
Clip clip1;
Clip clip2;
Clip clip3;
Clip clip4;
Clip clip5;
Clip clip6;
Clip clip7;
Clip clip8;
int val=100;
int isplaying;
void setup() {
//size(screenWidth, screenHeight, P2D);
size(500, 500);
PFont font;
font = loadFont("LiGothicMed-48.vlw");
oscP5 = new OscP5(this, 12000);
myRemoteLocation = new NetAddress("127.0.0.1", 11001);
clip1=new Clip(50, 50, color(200), 0);
clip2=new Clip(50, 120, color(255, 232, 160), 1);
clip3=new Clip(50, 190, color(232, 160, 160), 2);
clip4=new Clip(50, 260, color(45, 200, 1), 3);
clip5=new Clip(50, 330, color(145, 200, 221), 4);
clip6=new Clip(50, 400, color(3, 20, 121), 5);
clip7=new Clip(50, 470, color(255, 200, 255), 6);
clip8=new Clip(50, 540, color(200, 160, 145), 7);
}
void draw() {
clip1.display();
clip1.change();
clip2.display();
clip2.change();
clip3.display();
clip3.change();
clip4.display();
clip4.change();
clip5.display();
clip5.change();
clip6.display();
clip6.change();
clip7.display();
clip7.change();
clip8.display();
clip8.change();
}
... and the class:
int b;
color c=255;
int sx=150;
int sy=60;
String clipname="clip";
class Clip {
int x, y;
color cc;
color c;
int id;
Clip(int tempX, int tempY, color tempcc, int tempid) {
The reference says:
Use this class if you need to draw into an off-screen graphics buffer. If something is off-screen, does that mean that it's not on the screen, therefor why bother? Even the examples don't do any justice. Any creategraphics examples can be easily reproduced without using the createGraphics class. So what is it good for? And what's an off-screen buffer? Can you give me an example?
I'm trying to create a simple application where a rect is drawn on the screen and moved by keys. 'a' is supposed to move the rect down while 's' is supposed to move it upwards. For some reason after I press 'a' and the rect stops at the bottom, 's' takes over and key 'a' becomes unresponsive... Any ideas how the sketch could be improved?
just got this uber cheap tablet form ebay (£60!!!!) and it does not have USB connections. How else can I install a sketch on it? It has internet connectivity so I can send a sketch to the tablet.
None of them works on Snow Leopard. Sunflow4p5 kinda works but the screen turns black and the topic where it was posted is closed. Is there anything out there that works?
It's silly but I can't store numbers (0 to 9) from the keyboard. My idea is to use the keyboard to enter numbers into an algorithm. In other words, imagine a calculator sketch where the input is the keyboard. I thought about using this:
int variable;
void keyPressed(){
if(key==0){
variable=0;
}
...
..but it seems too excessive to setup an if statement for every number. I also tried this:
println(key);
but that results nothing. It's annoying...it must be easy to enter numbers from the keyboard but I couldn't figure out how... Thank for your help in advance!
I was wondering how could I write a simple application that counts the number of days from a certain date. I just want to be reminded how long ago I have stopped smoking:) However the day() and month() functions can tell the date, I'm not sure how to count days from a past event. Any ideas?
Hi, since I installed the latest Processing, things get worse by the day. First I had problem with the ant library, now Processing just stopped working. It starts up but does not open any files at all. I tried to re-install it, install older non-beta versions yet it still doesn't work. Any ideas?
since I installed the latest Processing, things get worse by the day. First I had problem with the ant library, now Processing just stopped working. It starts up but does not open any files at all. I tried to re-install it, install older non-beta versions yet it still doesn't work. Any ideas?