We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › MostPixelsEver confusion
Page Index Toggle Pages: 1
MostPixelsEver confusion (Read 674 times)
MostPixelsEver confusion
May 14th, 2009, 7:16am
 
trying to play with MPE in Eclipse and im running into an issue where the frameEvent function is never run. Interestingly enough if I comment out the function I receive an error saying that it needs to exist. Sort of confused how the program knows the function is there but is not running it. I'm sure I'm just missing something as I have been staring at it for far too long.
Code:

import processing.core.PApplet;
import mpe.client.*;

public class MPEtest extends PApplet {
Stripe[] stripes = new Stripe[50];
UDPClient client;
boolean start = false;

final int ID = 0;

public void setup() {
client = new UDPClient(sketchPath("mpe" + ID + ".ini"), this);
size(client.getLWidth(), client.getLHeight());
client.start();
noLoop();
for(int i = 0; i < stripes.length; i++) {
stripes[i] = new Stripe(this, client);
}
}

public void frameEvent(UDPClient c) {
start = true;
println("its happening");
c.broadcast("this is running");
redraw();
}

public void draw() {
println("what up");
client.broadcast("lets gooooooooooooo");
if(start) {
client.placeScreen();
background(100);
for(int i= 0; i < stripes.length; i++) {
stripes[i].move();
stripes[i].display();
}
client.done();
}
}

public static void main(String args[]) {
PApplet.main(new String[] { "--location=100,100", "MPEtest" });
}
}


I've seen similar questions posted here but no answers Sad
I'm sure someone smarter than me can help  Smiley
Re: MostPixelsEver confusion
Reply #1 - Jun 1st, 2009, 8:58am
 
No one? Even a hint?
Page Index Toggle Pages: 1