Specify values for input text fields

You'll specify values for the input text fields. You'll use the values when you write ActionScript that multiplies the quantity and cost values.

  1. In the Script pane, with the insertion point after the text that reads 125;, press Enter or Return twice and type the comment //set initial values for the quantity text fields.
  2. Press Enter or Return, and type the following:
    qty1_txt.text = 0;
    

    qty1_txt is the instance name that you gave the first input text field under the QTY column. .text is a property that defines the initial value in the text field, which you specify is 0.

  3. Press Enter or Return and type the following two lines to set values of 0 for the other two QTY fields:
    qty2_txt.text = 0;
    qty3_txt.text = 0;
    

    When you finish, the ActionScript should appear as follows:

    //set initial values for the quantity text fields
    qty1_txt.text = 0;
    qty2_txt.text = 0;
    qty3_txt.text = 0;