Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Swapping out Video Files

$
0
0
Just in case anyone has any similar problems I seem to have solved this by stopping (movie.stop()) all the movies before initiating the new ones.

  1. //called via selectInput() when new video file is selected
  2. void fileSelected(File selection) {
  3.   if (selection == null) {
  4.     println("Window was closed or the user hit cancel.");
  5.   } 
  6.   else {
  7.     for (int i = 0; i < myMovies.length; i ++ ) {
  8.       myMovies[i].stop();
  9.     }
  10.     vidFile = selection.getAbsolutePath();
  11.     initVideo(); //re-initiate video
  12.   }
  13. }

Viewing all articles
Browse latest Browse all 1768

Trending Articles