My First APE Experiment
As you all know APE(ActionScript Physics Engine) is an OpenSource free AS3 2D Physics engine that can be used for Flash and Flex.

I just tried APE and made this simple SWF as a beginning into the world of Physics in Flash. You can drag these RectangleParticles which you see in this swf. You can get the SWF here.
One issue which i faced while doing is that there is some compatibility issue with APE and Flash Player 10. As the Vector Class used in APE will conflict with new Vector of Flash Player 10.
I had to fix with by changing the class name and all the references to Vector class in APE. With this i could able to succeed in running APE on Flash Player 10.
You can download the working modified APE Source for Flash Player 10.
I am still trying to figure out how to rotate the RectangleParticles on bounce. In this example, RectangleParticles are not bouncing. Will try to figure it out and will post soon about it...
November 19th, 2009 - 13:36
Rectangle particles do not rotate. If you want a “tumbling” object you need to use a spring constraint group as in these examples http://www.garrahan.org/ape/?p=4 and http://www.garrahan.org/ape/?p=6
November 19th, 2009 - 23:32
Kormak,
thanks for pointing out about Spring constraint group.
We do have a brach in APE code which support angular velocity for RectangleParticles – http://ape.googlecode.com/svn/branches/rigidape/
But the problem with code is that while the particles have to settle on the Floor, they will have some jitter effect, which is not quite smooth behavior.
I tried this branch for this same example, the angular rotation is very smooth but while the particles have to settle down, they will have some jittery motion. Thats a bit disturbing …