Free ActionScript

Flash AS2 & AS3 Tutorials, Game Code, Effects, Source Files & Sample Downloads

Physics – Multiple objects (balls) colliding

After months and months of trying to figure this one out, I finally managed to build a fully working example!

So, here is the first version of my Simple Physics script – multiple balls colliding and bouncing off each other.

Preview

Download Fla Sample

Download Fla Sample

I have to give credit to a book called HTML5 Canvas by Steve Fulton & Jeff Fulton (great book!). It was very hard to grasp the law of conservation of momentum without it. Thanks guys!

Pushing MovieClip Objects

This script shows you how to make movieclips push each other without using complicated trigonometry.

Objects push each other based on mass, speed and direction of travel.

Download Fla Sample

Download Fla Sample