Build 10 classic Flash games and learn game development along the way with this ultra-fast paced game development course.

If you love this blog, this is the book for you.

Buy the book

Get the source code of 12 commercial Flash games, which have been loaded more than 50 million times!

Learn from real world successful examples.

Get it now

Box2D for Flash Games teaches you how to make Flash physics games from scratch with the most advanced features.

Create the new Flash game smashing hit.

Buy the book

Dungeon Raid iPhone game engine made with Flash and AS3 – making items fall

Here we go with a feature which has been requested a lot: taking the Dungeon Raid iPhone game engine made with Flash and AS3 and making items fall once you collect some of them, just like all Bejeweled-like games.

You can find some examples in these posts: Complete Bejeweled game in less than 2KB, Complete Bejeweled prototype made with jQuery and Complete Bejeweled game in less than 2KB – legible version.

The concept is also very similar: once you performed a successful match, scan all items from bottom to top, shifting down floating items and replacing empty spots on the top of the grid with new items.

Moreover, it’s even easier because this kind of game does not feature combos.

Here is the commented source code:

and this is the result:

Draw with the mouse to match items of the same color. This prototype does not include any animation, but it should be easy to add them.

Download the source code.

Rate this post: 1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 4.60 out of 5)
Loading ... Loading ...
Flash Templates provided by Template Monster are pre-made web design products developed using Flash technology.
They can be easily customized to meet the unique requirements of your project.
Be my fan on Facebook and follow me on Twitter! Exclusive content for my Facebook fans and Twitter followers

This post has 6 comments

  1. ChrisM

    on September 4, 2012 at 4:04 am

    Nice!

    I accidentally dragged off the stage (the index is -1 is out of range 8), so it looks like that is being handled, and still works.

    Nice addition!

  2. Jae

    on September 5, 2012 at 6:23 pm

    A cool tutorial, but there is a significant flaw in the design.
    It is not only possible, but very likely to start with or quickly get to a board arrangement with no moves. What are some strategies you could use to prevent this?

    Also, your color scheme is not colorblind friendly. It is VERY difficult to tell the green and yellow apart.

  3. Dungeon Raid iPhone game engine made with Flash and AS3 ... | Video Gamer Weekly

    on September 5, 2012 at 6:29 pm

    [...] the original post: Dungeon Raid iPhone game engine made with Flash and AS3 … (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if [...]

  4. Jae

    on September 5, 2012 at 6:43 pm

    never mind on the locked position, I didn’t know you could move across diagonals.

  5. Miami accountant

    on October 5, 2012 at 4:38 pm

    I will have a lot of work to do to achieve these effects (beginner) but it already sucked me up.

  6. Alex

    on October 25, 2012 at 11:20 am

    Main.as(23): col: 26 Error: Call to a possibly undefined method Tile.
    Main.as(88): col: 35 Error: Call to a possibly undefined method Path.

    ???