
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
291
Chapter 12
CHAPTER 12
Using Components
with ActionScript 2.0
In Chapter 11, we learned how to structure a basic OOP application in ActionScript
2.0. In this chapter, we’ll see how to create a GUI application based on that structure.
As usual, you can download the sample files discussed in this chapter from http://
moock.org/eas2/examples.
Currency Converter Application Overview
Our example GUI application is a simple currency converter. Figure 12-1 shows the
components used in our currency converter interface (Button, ComboBox, Label, Tex-
tArea, and TextInput). The user must specify an amount in Canadian dollars, select a
currency type from the drop-down list, and click the Convert button to determine the
equivalent amount in the selected currency. The result is displayed on screen.
We’ll place the assets for our application in the following directory structure, which
mirrors the structure we used in Chapter 11. Note that the deploy and source folders
are both subdirectories of CurrencyConverter and that org/moock/tools is a subdirec-
tory of the source folder:
CurrencyConverter/
deploy/
Figure 12-1. The currency converter application