Create a Flash game like Blockage – Movement prototype

This is one of those days when you want to make a thing work that way FULLSTOP.

And that’s it… this is the typical Blockage movement:

I wanted to do it without any timeline tween or tricks to change registration point on the fly, just using localToGlobal method. If you aren’t familiar with this method, read understanding AS3 localToGlobal method first.

So here it is the uncommented and unoptimized prototype. While comments and tutorial will come when I’ll integrate it into the making of the game, I think this can be useful to someone of you to have a sneak peak of what’s going on.

This is the main class:

and this is block_mc class:

Just remember I am using a 50 pixel sided square with origin at 0,0 and that steps==9 at line 18 is used only to make the square go back and forth.

Download the source code and solve the mystery… or wait for next step.

  • web_fuzzi

    hi,
    thanks for this simple instruction.
    i’ve got a question: can you tell me, how you made the star rating system on your page?
    thanks

  • sam

    It’s a plugin

  • Apollo

    Could you plz explain

    if (rotation%90==0)