Finding adjacent cells in an hex map – AS3 Version

I am porting this prototype into AS3.

I am not doing it for the sake of porting something, but because I want to show you a complete Dice Wars prototype.

I am sorry if the code is not that clean, I’ll come with a dedicated class later, but at the moment this is what I made.

If you want to stay up to date, you should read:

Anyway, this is the main class:

While hexagon_mc simply “turns off” the hexagons

This is the result:

Place mouse on an hexagon to highlight it and also highlight in a different color its neighbors.

Download the source code.

  • theo

    I still don’t understand how the hexagons are defined and drawn

  • Eren GOC

    i guess hexagon_mc class should inherit a library item. Could be a mistake.