Where to go now

There are two things you should do: first, managing the "next" feature as in the making of Tetris, then you could try to manage the "game over" status, when the balance rotates more than a certain amount of degrees (I would suggest 15) or when it's completely filled

Get Flash Game Development by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.