Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
wenqiu2b
wenqiu2b's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Question about display movie in Processing
[3 Replies]
08-Apr-2013 01:10 PM
Forum:
Core Library Questions
Hi geeks!
I'm a newbie of Processing.
I want to make a movie "click-pause" & "click-play" function in Processing.
Here is a code that didn't work well.
Could anyone please help me to check out the problem.
Thanks a lot!
int i;
import processing.video.*;
Movie myMovie;
void setup() {
size(300, 200);
background(0);
myMovie = new Movie(this, "1.mp4");
myMovie.loop();
}
void movieEvent(Movie m) {
m.read();
}
void draw() {
background(255);
image(myMovie, 0, 0,300,200);
if( i==0 ){
myMovie.pause();
}
if(i==1){
myMovie.play();
}
if (mousePressed == true) {
i=0;
i++;
if(i>1){
i=0;
}
}
}
«Prev
Next »
Moderate user : wenqiu2b
Forum