Programming an AIR Application
In this section, we'll use ActionScript to tie all of our interface components together into a unified application. ActionScript is similar to JavaScript in some ways (they are both based on ECMAScript), but very different in other ways, since they are derived from different branches of the specification.
While we could write all of our ActionScript code using frame scripts, it is better to leverage the Object-Oriented Programming features that are so prominent in the language and create a Document Class.
Establishing a Document Class
We'll now create a Document Class and bind it to our .fla
document. The Document Class will exist as a .as
file and exists separately from the .fla
file. When you use a Document Class for your project, it must extend either the MovieClip
or Sprite classes, depending upon whether you require animation or not in your main document timeline. Extending one class with another will give you access to all the...