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
Movie switch won't play newly loaded (Read 750 times)
Movie switch won't play newly loaded
Oct 26th, 2007, 12:03am
 
Not sure if this should be here, but i think this is something I'm doing wrong with the Movie class... I'm trying to randomly move through an array of overlaying movies with right and left mouse clicking, the new movie loads in the background (trying to avoid stops in the video) then assigned to one of the two that are being displayed, ends up taking two clicks but thats ok with me, the code looks like this:

<code>
void mousePressed(){
if(tempMov!=null && tempMov.available()){
     println("wish you would play");
  if (mouseButton == LEFT) {
 // movieA.stop();
 // movieA=null;
  movieA=tempMov;
  movieA.loop();
  movieA.speed(1);
  tempMov.stop();
  tempMov=null;
  }else if (mouseButton == RIGHT) {
// movieB.stop();
// movieB=null;
  movieB=tempMov;
  movieB.loop();
  movieB.speed(1);
  tempMov.stop();
  tempMov=null;
  }
}
else{
  println("start load");
  int rnd =(int)random(0,children.length);
   tempMov = new Movie(this,children[rnd],fps);
   tempMov.loop();
}
</code>

The movies load, display the first image but will not advance.


Any suggestions?
Cheers!
Re: Movie switch won't play newly loaded
Reply #1 - Oct 31st, 2007, 3:56pm
 
any advice for cutting load time, of a movie, I get delays, and eventually crashes playing quicktime videos(QT 7.2 problems I assume), on a mbp, switching videos as described before.  applying simple LIGHTEST blend mode.
Cheers.
Page Index Toggle Pages: 1