I'm curious how I would make something like an octopus or squid with arms made up of several elements, but moving in specified patterns.

I understand that the "arm" would have different states that it would step into, depending on the scenario. I also understand that it would take something involving kinematics (inverse or forward, I assume) to piece an "arm" together.

What I'm having problems understanding is how to create these movements via actionscript. Exactly what will tell the "arm" how to move? I know that sin and cos can be used to create something like a wave effect, but what about REALLY specific movements (the arm pulls back and then snaps toward the player)?

Here's an example of what I'm trying to describe:

http://youtube.com/watch?v=PdZ3tyW2QfI&feature=related

Right about the 3:30 mark.


How would YOU implement such a behavior?