2015年10月5日 星期一

滑鼠按下去才會動

import gifAnimation.*;
PImage [] imagKPgif;
Gif myKP;

void setup(){
  size(400,400);
  myKP = new Gif(this,"KP.gif");
  //myKP.loop();
}
void draw(){
  image(myKP,0,0);
}
void mousePressed(){
  myKP.play();
  myKP.ignoreRepeat();
}

沒有留言:

張貼留言