Select File > Save As and save the document with a new name, in the same folder, to preserve
2.
the original start file.
Note: As you complete this lesson, remember to save your work frequently.
Select Window > Panel Sets > Training Layout to modify your workspace for taking lessons.
3.
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.
Click the input text field where users enter the quantity of CD players. Press Alt and drag the
1.
copy of the field down to the Shocks QTY area.
Alt-click the input text field that you just dragged; then drag the new copy of the field to the
2.
Cover QTY area.
Alt-click the dynamic text field for the CD players price; then drag the copy of the field to the
3.
Shocks price area.
Alt-click the field that you just dragged; then drag the copy to the Cover price area.
4.
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,
you're identifying the object as a text object.
Click the top input text field in the QTY column. In the Instance Name text box of the Property
1.
inspector (Window > Properties), type qty1_txt.
Follow the previous procedure to name the middle and bottom input text fields qty2_txt and
2.
qty3_txt, respectively.
Click the top dynamic text field in the Price column. In the Instance Name text box of the
3.
Property inspector, type price1_txt.
Follow the previous procedure to name the middle and bottom text fields in the column
4.
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 you're 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.
36
Chapter 4: Create an Application
Need help?
Do you have a question about the FLASH MX 2004-LEARNING FLASH and is the answer not in the manual?
Questions and answers