I made some tests and got weird results, but the question is
In reference the example says:
- void movieEvent(Movie m){
- m.read();
- }
And it will work with several movies with only this m.read() called inside it, right?
I mean I dont need to do:
void movieEvent(Movie m){
firstVideo.read();
secondVideo.read();
//well this would be strange, as i only have one parameter in parenthesis.. lost
//etc...
}
Do I?
So how is this working? This is a callback function right? It is called once for every movie? Why it is not just like mousePressed(), without any parameters? I've seen similar stuff in controP5. I just like to understand it.
The tests are that under 1.5.1 videos works without any call to movieEvent(), but in 2.0.b8 not, I had to use it... hummmm
this is the code of the test:
- import processing.video.*;
- Movie um, dois;
- void setup(){
- size (800,300, P2D);
- um = new Movie(this, "tet.mov");
- dois = new Movie(this, "tet2.mov");
- um.loop();
- dois.loop();
- }
- void draw(){
- background(0);
- image(um, 10, 0);
- image(dois, 400, 0);
- }
- // in 1.5.1 i can remove folowing lines and things still working...
- void movieEvent(Movie m){
- m.read();
- }