Accessibility
David Stiller

David Stiller

quip.net

Table of Contents

Created:
30 May 2006
Modified:
2 February 2009
User Level:
Beginner
Products:
Flash

Debugging ActionScript 2.0 code: Lifting the blindfold

Note: Debugging ActionScript 3.0 code takes advantage of a new workspace in Adobe Flash CS4 Professional that is unavailable for ActionScript 2.0 documents. This article is specifically aimed at Flash CS4 development in ActionScript 2.0.

Programming can be a bit like navigating blindfolded in a petting zoo. Sure, you may know the general layout (which pens are where, which animals are in each pen) but the fact remains that waddling, hopping, frolicking creatures are about—and they like to wander!

During playback of a SWF file, variables and properties may change over time or in response to user input. Often enough, such changes occur in unexpected ways. A dynamic text field may inexplicably display the wrong information or nothing at all. The cause of this trouble is hidden, of course, because the SWF file is already compiled—so who knows where those variables have waddled, hopped, or frolicked?

Fortunately, Adobe Flash provides a number of tools to unearth important information normally under wraps. This article discusses ways to bring this information to light when your FLA file is configured for ActionScript 2.0.

Requirements

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

Flash CS4 Professional

Sample files:

Prerequisite Knowledge

A cursory understanding of ActionScript.

About the author

David Stiller is an independent contractor whose portfolio includes multimedia programming and design for NASA, the US Department of Transportation, Nickelodeon, MTV, Wendy's, Adobe, and dozens of clients across the United States and Canada. He likes anaglyph 3D photography, finely crafted wooden game boards, Library of Congress field recordings, and Turkish coffee. David is self-taught and gets a kick out of sharing "aha!" moments with others through consultation, mentoring, and regular contributions to the Adobe Flash and ActionScript forums. He is a resident tutorial author at CommunityMX and co-author of Foundation Flash CS3 for Designers (friends of ED), ActionScript 3.0 Quick Reference Guide (O'Reilly), and Foundation Flash CS4 for Designers (friends of ED). David lives in Virginia with his amazing wife, Dawn, and his beguiling daughter, Meridian.