fullscreen PImage[] bee = new PImage [5];
String[] loc = {"bee0001.png", "bee0002.png", "bee0003.png", "bee0004.png", "bee0005.png"};
int frame = 0;
int y = 0;
void setup(){
size(500, 500);
background(255);
for(int i=0; i<bee.length; i++){
bee[i] = loadImage(loc[i]);
}
frameRate(20);
}
void draw(){
fill(255, 150);
rect(0,0, width, height);
image(bee[frame], 0, 500-y);
if (frame<4){
frame+=1;
}
else{
frame=0;
}
if(y<800){
y+=10;
}
else{
y = 0;
}
}
Using a high resolution video of a bee in flight, I made a simple 5 frame .png sequence of drawings in Flash. This animation is a test for a flocking/swarming project. Hopefully the animated bee will be one element in a swarm of insects.