
Adobe
flashthusiast.com
ActionScript coding conventions are very important for Macromedia Flash designers and developers to ensure that code and applications are structured in a way that is intuitive and beneficial to themselves as well as other people working on the same project. This is particularly important with long code files. When you follow coding conventions, everyone on the design and development team can understand the code and can work more efficiently. This document helps formalize the ActionScript coding process.
The sections in this article outline best practices for writing ActionScript. Some sections of Flash Help (Help > Getting Started in Flash) or the Flash 8 LiveDocs are helpful as well: Learning ActionScript 2.0 in Flash and ActionScript 2.0 Language Reference.
Note: For information about using Flash 8 and organizing FLA files, see Flash 8 Best Practices. It complements this document.
The following guidelines encourage consistency for people learning how to write ActionScript code. Adopt best practices at all times, whether you are a designer or developer, or working alone or as part of a team:
Note: If you are still using Flash MX Professional 2004 and not Flash Professional 8, please see the previous version of this article.
These guidelines relate to the following software:
Jen deHaan was raised by wolves in the deep woods of the Canadian north. Later in life, Jen worked with Flash as a deseloper, then wrote about Flash for five versions, and then worked on stuff that didn't include much Flash. She came to her senses in 2007 by rejoining the fabled Flash team at Adobe as a QE, focusing on the good stuff—Motion (on timelines). Jen enjoys long walks in the rain pondering how many times she can use the word Flash in a bio, and admits that after numerous years in California she is no longer addicted to Tim Horton's coffee.