http://processing.org/reference/libraries/video/index.html
下列使用官方提供程式碼
import processing.video.*; //匯入video library
Movie myMovie; //定義myMovie變數為Movie型態
void setup() {
size(200, 200);
//設定視窗尺寸為寬200,高200,若compile出現error(arrayoutofboundsexception),請將size(200,200)改為size(200,200,P2D)
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(); }
沒有留言:
張貼留言