My english is not very well,so ,I will do my best to describe it clearly:
The picture can move fluently from one side to the other side in the following programe,but if I imported a movie ,it can not move fluently.I don't know what the reason is on earth? I really appreciate for your any help.
I have another question ,which function can be used to take picture in a programe?
float px=0;
float py;
float s=1;
void setup(){
size(600,400);
rectMode(CENTER);
stroke(1);
smooth();
py=random(0,height);
}
void draw(){
background(123,123,38);
fill(23,255,50);
if(px>680){
px=0;
py=random(0,height);
}
rect(px,py,80,80);
px=px+s;//指定移动速度
if(mousePressed&&mouseX<px+40&& mouseX> px - 40&&mouseY<py+40&&mouseY>py-40){
px=mouseX;
py=mouseY;//与鼠标互动
}
}