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.
Page Index Toggle Pages: 1
Video library and Strings (Read 301 times)
Video library and Strings
Dec 9th, 2008, 4:10pm
 
Hey all,

I am a newbie, and I wan't to build a program that can play video clips in a specific order reading the file name and order from a String.
So far i have made this:

import processing.video.*;
Movie myMovie;
String movies[];

void setup() {
 movies=loadStrings("movies.txt");
 size(320, 280);
 myMovie = null;
 myMovie = new Movie(this, movies[]);
 frameRate = 25;
 myMovie.play();
 background(0);
}

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

// Called every time a new frame is available to read
void movieEvent(Movie m) {
 m.read();
}

I think i need to tell the program where to start reading the string, and what to do when that clip is done playing. I just can't figure out how to make it play the first clip at all. Please help me!
Page Index Toggle Pages: 1