I've been playing with this for a while and it seems to work, but I have run into something else that I don't understand.
I seem unable to draw a frame of a quicktime movie from within a control loop. That is, with myMovie.speed(0),
Code:
image(myMovie, 0, 0, width, height);
works as a one-time command, displaying as a still image whichever frame the playhead is at, but putting it in a loop like this:
Code:
for (int i = 0; i < number; i++) {
println("now printing frame " + (i + 1) + " of " + number + " frames");
myMovie.jump(myMovie.time() + frameLength);
image(myMovie, 0, 0, width, height);
}
produces a new line of text for each would-be frame, but the quicktime image doesn't update until the 'for' loop is done, and then it jumps 'number' frames in one leap. This is not what I want; what I want is to display a quicktime frame, then the next, then the next, etc., not at some continuous speed, but one frame at a time. I've tried inserting various 'delay's and it doesn't help; I've tried letting the 'image' command reside in 'draw' and be triggered by flags, tried putting it in seperate functions, tried making the loop variables global in scope, but I can't get it to work.
Can anyone tell me why it does this, and whether there is a way around it? I'm about to outsource the control loop to a microprocessor and then have it control 'processing's' display by triggering it one frame per external command, which it can do, but it really seems like it should be able to do this itself, and that I just don't know something (which is hardly new!).
Thanks.