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 & HelpPrograms › joining strings to make pixel array object!
Page Index Toggle Pages: 1
joining strings to make pixel array object?!? (Read 584 times)
joining strings to make pixel array object?!?
Nov 17th, 2005, 7:27pm
 
How can I make this work? essentially i need the equivalent of the flash eval command.

where framemask are Pimages defined at the start of the sketch.

Code:

for (int i=totalFrames; i > 1; i--) {
"framemask" + i = "framemask" + (i-1).get();
}


cheers
niall
Re: joining strings to make pixel array object?!?
Reply #1 - Nov 18th, 2005, 6:56pm
 
Use an array. Flash prevents you from defining certain movie instances as children of an array object. In Processing pretty much any datatype can stored in an array:
Code:

PImage [] buffer;
int i = 0;
void setup(){
size(200,200);
buffer = new PImage[10];
for(int i = 0; i < buffer.length; i++){
buffer[i] = new PImage(200,200);
rect(100,100,10*i,10*i);
loadPixels();
buffer[i] = g.get();
}
}
void draw(){
image(buffer[i],0,0);
i = (i+1)%buffer.length;
}
Re: joining strings to make pixel array object?!?
Reply #2 - Nov 19th, 2005, 1:41pm
 
Please don't double post.

Now this has to be removed.
Page Index Toggle Pages: 1