Part of my goals with these posts is teaching Flex for those just getting started. What better way to learn Flex than by building a game of Tic-Tac-Toe. Code is code and lessons can be learned/shared despite the final output. You’ll (hopefully) learn tricks and methodologies for helping you code non-game projects via the code that I share and explain in this series.
There are 3 files that make up the complete game (right click to view/download the source) :
- Main.mxml – This has the Application tag
- GamePiece.mxml – This is the X/O game piece
- GameBoard.mxml – This is the tic-tac-toe gameboard
I’ll go over the 3 files, explaining logic on why/what from both the Flex and gaming perspective. Read the rest of this entry »