i have this code
Code:import processing.video.*;
MovieMaker mm;
PImage img;
PShape s;
float xplus = 0.1;
float yplus = 0.1;
float xx = random(0, 0.05);
float yy = random(0, 10);
void setup(){
mm = new MovieMaker(this, width, height, "randomcores7.mov",
30);
size(720,576);
smooth();
img = loadImage("Image.jpg");
}
void draw(){
mm.addFrame();
fill(255,4);
rect(0,0,width,height);
float x = noise(xx)*width;
float y = noise(yy)*height;
xx += xplus;
yy += yplus;
String[] shapeNames = { "1.svg", "2.svg", "3.svg","4.svg", "5.svg", "6.svg", "7.svg", "8.svg", "9.svg","10.svg", "11.svg"};
PShape[] shapes = new PShape[shapeNames.length];
for (int s = 0; s < shapes.length; s++)
shapes[s] = loadShape(shapeNames[s]);
PShape shapeToDraw = shapes[int(random(shapes.length))];
float r = random(255);
float g = random(255);
float b = random(255);
float prop = random(150);
shapeToDraw.disableStyle();
noStroke();
int x2 =(int) random(width);
int y2 =(int) random(height);
float rot1 = random(5);
color col = img.get(x2,y2);
fill(col);
translate(x,y);
rotate(rot1);
scale(random(0,1));
shape(shapeToDraw,0,0);
ellipse(x2,y2,10,10);
if(frameCount > 400){
mm.finish();
exit();
}
}
and i want to make a little video clip out of it and im getting an error that says " ArrayIndexOutOfBoundExeption" in the mm.addFrame();... does anybody know why? i just made 3 videos with other programs i had done, and it all worked fine, now im having this problem :s