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 › play sketch
Page Index Toggle Pages: 1
play sketch (Read 569 times)
play sketch
Dec 11th, 2009, 10:54am
 
Hi

I have this program that is written very similar to the play or loop program for a short video. The strange thing is that it sometimes works and other times does not. The error is reads when it decides not to run is: "ArrayIndexOutofBoundsException: Coordinate out of bounds!"
Adjust the size and other various aspects didn't seem to affect it either way and it still seemed to actually work at random. I'm just looking to write a program to play a video when this tilt switch we have is activated externally, then triggering projections through use of the Arduino. Can someone explain or help?
Okay, so here's the super basic code I have that isn't working:

import processing.video.*;
Movie myMovie;

void setup() {
 size(800, 700);
 myMovie = new Movie(this, "bella_gp.mov");
 myMovie.loop();
}

void draw() {
 image(myMovie, 0, 0);
}

void movieEvent(Movie m) {
 m.read();
}

void mousePressed() {
 myMovie.stop();
}


Thanks
Abbie
Re: play sketch
Reply #1 - Dec 12th, 2009, 1:34am
 
Try to replace image() with this one:

Code:
 image(myMovie, 0, 0, myMovie.width, myMovie.height); 



or this one

Code:
 image(myMovie, 0, 0, width, height); 



Try to use different codecs in your .mov file.
Page Index Toggle Pages: 1