Keep balance game

Hello!
I want to make a game similar to this:http://fun.drno.de/flash/HomeRun.swf. Do you know some ready solutions for creating this physics of game?