Accessibility
Nick Avgerinos

Nick Avgerinos

blogs.adobe.com/adobearcade
axcella.com/~nicka

Table of Contents

Created:
21 December 2009
User Level:
Beginner, Intermediate
Products:
Flex

Building a game with Flash Builder using the Cairngorm framework – Part 1: Displaying the board and processing player moves

Due to the ubiquity of Adobe Flash Player, the Adobe Flash Platform is the most popular global platform for building games. Adobe Flash is also increasingly being used in the enterprise community to develop RIAs. As a result, developers with a wide range of skill sets and expertise are developing for the Flash Platform.

In this article, I'll highlight concepts many RIA developers may already be familiar with (the Flex and Cairngorm frameworks) and describe how they can be used to build a simple four in a row game.

This is the beginning of a three part series. In this first part, you'll learn how to:

  • Import graphics built in Flash CS4 to create the game board
  • Create an MVC framework to represent the game components
  • Handle mouse events to process the player's moves

In Part 2, you'll update the game to add the game logic. You'll extend the game's features to detect when a player has won (or determine that there are no possible winning moves remaining). In Part 3, you'll take the game one step further by adding some simple artificial intelligence (AI) that allows a single user to play the game with the computer.

Requirements

In order to make the most of this article, you'll need the following software and files:

Flash Builder 4 beta

Flash CS4 Professional

Cairngorm framework

Sample files:

Prerequisite knowledge

This article assumes you have a working knowledge of Flash Builder 4 and the Cairngorm frameworks. Prior game development experience is not required.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 Unported License.

About the author

Nick Avgerinos has worked at Adobe for two years, primarily as a systems engineer. He's also been working within Adobe to increase the awareness of game developers on the Flash Platform. He keeps a blog on the subject at blogs.adobe.com/adobearcade.