Bouncing balls

Ok ive got this ball that bounces around the screen. There are a bunch more that are made with the duplicate movie clip command. I want them to bounce off eachother, as well as the walls. The problem is, i cant just put the code on the original ball because then balls want to bounce off themselves which creates problems. So my question is, is there some kind of loop I can use to make it so each duplicate ball will bounce off the others but not itself?