12.1 Currency Converter Application Overview

 <  Day Day Up  >  

Our example GUI application is a simple currency converter. Figure 12-1 shows the components used in our currency converter interface (Button, ComboBox, Label, TextArea, 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.

Figure 12-1. The currency converter application
figs/as2e_1201.gif

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 subdirectory of the source folder:

 CurrencyConverter/   deploy/   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 CurrencyConverter.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.

 <  Day Day Up  >  


Essential ActionScript 2.0
Essential ActionScript 2.0
ISBN: 0596006527
EAN: 2147483647
Year: 2004
Pages: 177
Authors: Colin Moock

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net