ActionScript is, in a nutshell, JavaScript with a Flash-oriented DOM. If you can write spaghetti code in one, you can write spaghetti code in the other.
The three key steps for mastering ActionScript are:
- Don’t use the crappy Flash (in fact, don’t even think about using it, it is a hideous development environment).
- Get a decent book on the language and focus on figuring out the DOM and event models.
- Learn how to use MTASC.
Debugging
- Install the Flash Debug Plugin (be prepared to faff around with the installer and administrative accounts)
- Create a
mm.cfg
file in the system-wide (yes, I know, it’s dumb)/Library/Application\ Support/Macromedia
folder with the following content:
ErrorReportinEnable=1
TraceOutputFileEnable=1
- Logging is then performed to
/Users/username/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt
There is also Flashbug, which is nice if you don’t want to use the Flash Debug Plugin.
Resources
Mac-specific
- Developing Flash on a Mac (oooh, movie eyecandy)
- [HOWTO: Develop Flash on Mac OS X with Rake, MTASC, SWFMill and TextMate] (much more detail)
Libraries
- ActionStep – an OpenStep-like framework for Flash (fear!)
- AnimationPackage
- Particle class