We are about to switch to a new forum software. Until then we have removed the registration on this forum.
like this you can play back movie, how to make array with video files and use those with movie library? so i can use
image(myMovie[1], 0, 0);
image(myMovie[2], 0, 0);
etc.
import processing.video.*;
Movie myMovie;
void setup() {
size(200, 200);
background(0);
myMovie = new Movie(this, "totoro.mov");
myMovie.loop();
}
void draw() {
image(myMovie, 0, 0);
}
// Called every time a new frame is available to read
void movieEvent(Movie m) {
m.read();
}
Answers
http://processing.org/reference/Array.html
thanks, but also how do i load movie file paths into array so i don't need to specify them for each movee instance?
this is how i would do this for image files:
but what about movie files? String[] PATH= new String[2]; there is no loadPath to use with for loop etc.
Also why you use this? code seems to work also when this is commented out
Let's build on owaun's code:
I think the second movieEvent function was a mistake...
My code is no more tested than owaun's one. :-)
thank you for answer, but how to instead of explicitly writing every file
String[] movieNames = { "One.mov", "Two.mp4" };
show path to folder with video files and load all those with the for loop?Take a look at my example in your other thread below:
http://forum.processing.org/two/discussion/6115/how-to-load-images-ignoring-file-names-and-extensions
Just replace: ".png", ".jpg", ".jpeg", ".gif" w/ analogous video extensions! *-:)
If you meant a pop-up folder selector, you gotta use selectFolder():
http://processing.org/reference/selectFolder_.html
My complete app "Display by Last Modified" uses that too! Check it out: :-c
http://forum.processing.org/one/topic/listing-last-10-modified-files-in-directory