
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
The Document Timeline
|
287
classpaths, see “Package Access and the Classpath” in Chapter 9. For information on
storing classes in a central repository, see Chapter 14.
The Document Timeline
We’ve now created two classes (A and B) and a Flash document that will use them
(AppName.fla). Let’s see exactly how AppName.fla loads the classes and invokes the
class method A.main( ), which starts our application.
In Chapter 2, we learned that the fundamental metaphor of a Flash document is the
timeline, which can be used to create animations like a filmstrip. When used for ani-
mation, the frames in the timeline are displayed in rapid linear succession by the
Flash Player. However, the timeline can also be used to create a series of application
states, in which specific frames correspond to specific states and frames are displayed
according to the application’s logic, not linearly (according to the passing of time).
In our example application framework, we’ll use the timeline of AppName.fla to cre-
ate two basic application states: loading and main. Each state is implemented by
pausing the playhead in a corresponding labeled frame. On the frame labeled
loading, we display a loading message while our application’s classes load. On the
frame labeled main, we invoke A.main( ), which starts the application. ...