Probably another stupid question. I'm trying to combine several sketches in one running program and using "import java.lang.reflect.Constructor". I downloaded the method, but I can't open different image in each sketch.
Main code is :
import java.lang.reflect.Constructor;
final int W = 940, H = 480, BG = #000000, fps = 30, seconds = 6;
boolean export = false;// true je m'enregistre des images
I load a .cs file using a snippet found on Processing-wiki. It works perfectly, but when I try to use it, with minor alteration, I get nullerror exception. The cs file is in the directory and it work as long as I address it within the setup ?!?
I 'have been spending the last days trying to solve this, I have a "ball" that circulate on the screen. When the ball is "offScreen", the ball's variables should be aded to another array (BouletteFixe) that will be displayed later on. Then, another ball will be circulated on a different direction and should be saved also.
I use append() in every manner (following Mrs Reas&Fry book aswell Mr Schiefman book). I feel stupid because the answer is probably obvious.
here is the code :
// Boulettes
// avancer et garder la derniere
Boulette blt;
BouletteFixe[] bltfx = new BouletteFixe[1];
void setup() {
size(400, 400, P3D);
blt = new Boulette();
bltfx[0] = new BouletteFixe(0.0,0.0,0.0,color(0));
}
void draw() {
background(255);
frameRate(5);
for (int i=0; i<bltfx.length ; i++) {
bltfx[i].display();
}
if (offScreen != true) {
blt.move();
}else {
/// PROBLEMS
BouletteFixe[] boul = new BouletteFixe(v_xpos,v_ypos,v_diam,v_c);
bltfx =(BouletteFixe[])append(BouletteFixe,boul);
// je mets la nouvelle boulette à la fin
offScreen = true ;
}
blt.display();
}
//===================================
class Boulette {
float []xpos = new float [1];
float []ypos = new float [1];
float []diam = new float [1];
color []c = new color [1];
float theta ;
How to have two prog running at the same time ? I mean, while prog 1 is using the whole screen, I'd like to have a (prog 2) text that goes through the window without disturbing the execution of prog 1.