Making a game(actionscript)

i want to make a game similar to hungry hungry hippos. how would make random balls bouncing around and when it goes into the area of the mouth the player can eat it? and then at the end it will have a record of how many was eaten