Balance the tray by moving the mouse around. If the tray falls, flip it back over by swinging the mouse around.
Avoid (or collect!) the balls but be careful, while they increase your score, they make it harder to balance.
-- In response to comments, I have fixed the balls being able to fall through the sides of the tray. The other fixes (weight dependant on size of the balls, and make the tray lean if the balls are all on one side) haven't increased the gameplay by any noticeable amount and really slow the flash down. Therefore I left those out. Thanks for the feedback though :)