User Guide

36 Chapter 4: Create an Application
2.
Select File > Save As and save the document with a new name, in the same folder, to preserve
the original start file.
Note: As you complete this lesson, remember to save your work frequently.
3.
Select Window > Panel Sets > Training Layout to modify your workspace for taking lessons.
The form already includes an input text field in the QTY column and a dynamic text field in
the Price column. You’ll copy the text fields for the Shocks and Cover rows.
Copy input and dynamic text fields
You’ll use input text fields to create a form.
1.
Click the input text field where users enter the quantity of CD players. Press Alt and drag the
copy of the field down to the Shocks QTY area.
2.
Alt-click the input text field that you just dragged; then drag the new copy of the field to the
Cover QTY area.
3.
Alt-click the dynamic text field for the CD players price; then drag the copy of the field to the
Shocks price area.
4.
Alt-click the field that you just dragged; then drag the copy to the Cover price area.
Name text fields
Before you can specify values for the text fields in ActionScript, you first need to give each text
field an instance name in the Property inspector. By appending the instance name with TXT,
youre identifying the object as a text object.
1.
Click the top input text field in the QTY column. In the Instance Name text box of the Property
inspector (Window > Properties), type qty1_txt.
2.
Follow the previous procedure to name the middle and bottom input text fields qty2_txt and
qty3_txt, respectively.
3.
Click the top dynamic text field in the Price column. In the Instance Name text box of the
Property inspector, type price1_txt.
4.
Follow the previous procedure to name the middle and bottom text fields in the column
price2_txt and price3_txt, respectively.
Add and name a Button component
Components are movie clips that offer an easy way of adding advanced functionality to your
document without having to know advanced ActionScript. You’ll use the Button component to
create a Calculate button that totals prices. Because the component youre using is based on
ActionScript 2.0, you first need to configure your Publish Settings dialog box to ensure your Flash
content plays as expected.