
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
292
|
Chapter 12: Using Components with ActionScript 2.0
source/
org/
moock/
tools/
Our application’s main Flash document is named CurrencyConverter.fla. It resides in
CurrencyConverter/source. To create the CurrencyConverter.fla file, we’ll copy the
file AppName.fla (which we created in Chapter 11) to the CurrencyConverter/source
directory, and rename the file to CurrencyConverter.fla. That gives CurrencyCon-
verter.fla the basic structure it needs, including a class preloader on frames 2 and 3
and a frame labeled main, on which we’ll start the application.
Our application’s only class is CurrencyConverter. It is stored in an external .as class file
named CurrencyConverter.as, which resides in CurrencyConverter/source/org/moock/
tools. Our exported application (a Flash movie) is named CurrencyConverter.swf.It
resides in CurrencyConverter/deploy.
Now let’s take a closer look at each of these parts of our application.
Preparing the Flash Document
Our CurrencyConverter class instantiates all the components needed for our applica-
tion at runtime. Even though we create instances of components at runtime, Flash
requires us to add the components to the CurrencyConverter.fla’s Library during
authoring. Unfortunately, Flash does not allow us to simply drag the required com-
ponents from the