Fish animation

Hi all,

I found that fish animation and think it’s brilliant and pretty cool.
http://abowman.com/google-modules/fish/

I’m just curious to know what kind of method? How it was done? in AS3
Would like to learn how the fishes moving their body and tails.
I appreciate if someone knows or tutorials can be helpful.