MACROMEDIA FLASH 8-FLASH Specifications Page 105

  • Download
  • Add to my manuals
  • Print
  • Page
    / 290
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 104
Summary 105
When you finish, your script should appear as follows:
on(click) {
with(_parent){
priceTotal_txt.text = Number (price1_txt.text) + Number
(price2_txt.text) + Number (price3_txt.text);
}
}
The event handler that you typed specifies that the text in the
priceTotal_txt field should be the sum of the values in the price1_txt,
price2_txt, and price3_txt fields.
Test your application
You’ll test your application to ensure that it executes as expected.
1. Save your document and select Control > Test Movie.
2. In the test version of your movie that appears in Flash Player, type
numbers in the QTY fields to see what appears in the Price fields.
3. Click Calculate to see the total price for all parts.
Summary
Congratulations on learning how to create an application. In a few
minutes, you learned how to complete the following tasks:
Copy input and dynamic text fields.
Assign instance names to text fields.
Add a Button component.
Declare variables and values.
Specify values for text fields.
Write a function.
Write an event handler for the component.
To learn more about ActionScript, see the ActionScript tutorials in
Flash Tutorials.
Page view 104
1 2 ... 100 101 102 103 104 105 106 107 108 109 110 ... 289 290

Comments to this Manuals

No comments