APE stands for Actionscript Physics Engine and it´s a great engine that allows for easy creation of dynamic systems that simulate physics. You start by creating particles and groups of particles, apply forces (such as gravity) and constraints (such as spring) to these particles and groups and add listeners to detect collisions beetween them.
The engine is in a very mature state and in constant development. And it’s open-source.
More about it at: http://code.google.com/p/ape