Color a Truck Created for National Fire Protection Association (NFPA)

Use mouse to select tools for artistic expression of color.

Form

CLASSIFICATION //

Flash, web-based, supplementary, NFPA

Format:

Flash SWF

Deployment:

One of three games hosted on Sparky's Firehouse (also developed by me), the most popular section of the NFPA's Sparky The Fire Dog website.

Components:

Flash-compiled SWF. Imports "fl.swc", "flash.swc", "playerglobal.swc", and 3 SWC files for individual pictures.

Language:

ActionScript 3.0

Function

CLASSIFICATION //

game, tool, coloring

Theme:

Colorable, action-filled scenes depicting the adventurous, heroic work of fighting fires. NFPA's Sparky the Fire Dog makes appearances.

Behavior:

Mouse selects painting tools or colors. Three different paintbrushes allow color to be applied freely. Paint bucket tool fills areas with solid color. Undo function. Erase all function. Two print buttons allow uncolored or colored image to be printed within a picture frame border, carefully sized to fit US Letter-sized paper in portrait orientation.

Mechanics:

Colorable FLAs Embedded as SWCs

Optimized for the Flash Authoring Tool workflow used at Powerhouse Animation, each colorable picture has its own FLA to simplify the management of symbols and make debugging easier. Each picture FLA contains 100-300 different MovieClips. This lets the paint bucket tool select colorable areas based on the MovieClip being clicked.

These picture FLAs were exported as SWC files and imported into the project codebase at compile time as unique classes.

State Pattern used for Tools

All concrete tool objects implemented an "ITool" interface defining functions, "engage", "disengage", "isBusy". When the user selects a different tool, the "ToolsPanel" object uses this interface when swapping between these tool objects.

Project Source Code

25 classes were created for this project, broken down into the top-level packages, "gui", "picture", "tools", and "util". The codebase was kept as simple as possible. Use of native Flash libraries makes the program easier for forthcoming developers to work with.

Requirements:

  • Family-friendly
  • Promote fire safety
  • Appeal to the younger range of the site's users, ages 5-8

Critique:

Observer Pattern used heavily, which does a great job of decoupling things, but also makes debugging more confusing.

Creation

CLASSIFICATION //

powerhouse-animation, team-project

Completion Date:

2011-12

Duration:

~3 months

Collaborators:

I was the sole developer. Worked with several artists.

Tools:

IntelliJ IDEA, Adobe Flash Professional CS5

Challenges:

  • The print function was harder to write than anticipated, largely due to the complications of ActionScript's "BitmapData.draw()" function.