Create a Flash game like The Impossible Line step 1 – draw following mouse movement

Did you already play The Impossible Line?

It’s a free iOS game with more than 200 levels. It’s basically a mouse avoider game (let’s call it “finger avoider being a mobile game). All you have to do is drawing a line with your finger from a point A to a point B avoiding obstacles.

The problem is obstacles disappear once you start the level.

The really interesting thing, being a mobile game, is the way you can draw. Unlike Flash games where you move the mouse, which does not cover the level, moving your finger on the level would cover it. So The Impossible Line guys gave you the capability of moving your finger anywhere on the screen, and your movement will be replicated by the main pointer.

Try it by yourself:

Draw with the mouse anywhere and see how the arrow sprite moves according to your mouse movements.

And this is the fully commented class:

Next time, adding obstacles and the radar, as in the original game.

Download the source code.