The animation itself

Animating the disc is not that hard once you know where it will end, because we already decided it's just a linear motion. So you just need to move down the disc for a certain amount of pixels until it reaches its destination. Defining such an amount is the hardest decision. Let me explain the concept.

During the game, when the disc is moving horizontally, its y position is -40. Then, it must reach 35+60*r where r is the number of the row. The total amount of pixels is 40+35+60*r = 75+60*r. To make a smooth, good looking animation, the disc must move for the same amount of pixels at every frame, so it must be a number that perfectly divides 60 and 75. The candidates in this case are 3, 5 and 15.

According to the amount of ...

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.