Anyone to help me with the code for something like this:

http://dev2.northkingdom.com/fjallbrynt/

I want only three balls and the balls should change shape when they hit its other like if they were made of soft rubber.