Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

How to make a video start on a full second at 1000 milliseconds...

$
0
0

I'm struggling to understand how to set the parameter so the sketch I've created starts at a full second.

The majority of components including a moving clock, movie and music all need to sync to the same time. However, currently the clock is running to actual time, and the movie and music start immediately from when the user would click 'Run'.

I understand and have used many time framed parameters within my coding, for example draw an ellipse at a certain time such as:

  if (millis() < 24610) {
    fill(255, 255, 0);
    stroke(255, 255, 0);
    strokeWeight(2);
    ellipse(width/2-140, height/2*k+140, 10, 10);
}

I just don't understand how to get a movie or song to play at the certain time, in order for everything to sync to your computers time (as the clock does)...

Could I use some part of the following statement?

  if (movie.available() == true) {
    movie.read();
  }

However add something like... if millis() is 1000 start movie and music...

Sorry, I am still very new to Processing and would appreciate the help a lot!

Thanks,

bmz


Viewing all articles
Browse latest Browse all 2896

Trending Articles