[Flash CS4 AS2] Collision detection on multiple objects

Hi everyone

I’ve downloaded the source for the below tutorial as I’m wanting to adapt it for my own purposes. It almost does what I want it to do but sometimes, instead of the objects bouncing off each other, they seem to judder and pass over each other.

http://www.kirupa.com/developer/actionscript/multiple_collision3.htm

Does anyone know how to change the code to solve this? I thought maybe it was because the objects aren’t squares but I’ve even tried putting a square graphic inside the movieclip and it still does the same thing.

Any help would be appreciated or even if anyone knows of any other tutorials could look at.