Introduction to Components Tutorial > Create a form > Configure the components |  |

Configure the components

The next step is to configure the components so they are set up with the correct information for a user to select.

You set the parameters for a component using the Parameters tab of the Property inspector or the Components Parameters panel.

Advanced users can use API methods and properties for each component to set the parameters, size, appearance, and other properties of the component. The methods and properties available for each component element are listed in the ActionScript Dictionary under the name of the component.

Configure the check box

1 | Select Frame 1 on the UI layer, then select the CheckBox component on the Stage. Its parameters are displayed in the Property inspector.
2 | Type sweepstakes_box in the Instance Name text box.
3 | Type Absolutely! in the Label text box.
4 | In the Initial Value Parameter pop-up menu, select True. This specifies whether the initial state of the CheckBox component is selected (True) or unselected (False).
5 | In the Label Placement parameter pop-up menu, leave the default value set to right alignment. The label will be displayed to the right of the check box.
6 | Do not alter the Change Handler parameter.
| The Change Handler parameter is the function that you want to execute when the user selects an item. This function must be defined in the same Timeline as the component instance. This parameter is optional and needs to be specified only if you want an action to take place as soon as the user accesses a component.
| When you finish, the Property inspector should look like the following:
7 | In order to see the text you entered for the label on the Stage, you need to enable Live Preview, if it is not already enabled. Choose Control > Enable Live Preview. After live preview is enabled, you will see Absolutely next to the checkbox on the Stage.

For more information about using the API methods of the FCheckBox component to set additional options for the component, see FCheckBox (component) in the ActionScript Dictionary.

Configure the combo box

1 | Select the ComboBox component on the Stage. Its parameters are displayed in the Property inspector.
2 | Type color_box in the Instance Name text box.
3 | Make sure the Editable parameter is set to False. This prevents users from typing in their own text.
4 | The Labels parameter displays a list of values users can select. Click the Labels field, then click the magnifying glass to open the Values pop-up window. Click the Plus (+) button to enter a new value.
5 | Click in the `default value` field, then type Lightning for the first value.
6 | Click the Plus (+) button to enter the next value. Click in the `default value` field, then type Cobalt for the next value.
7 | In the same manner, add Emerald to the list.
| When you are finished, the Values pop-up window should look like the following:
8 | Click OK to close the Values pop-up window.
| The Data parameter is optional. It is used to specify the values associated with the items (labels) in the list box. There is no need to do that for this tutorial.
9 | The Row Count parameter specifies how many rows are displayed in the window. Since there are three options, change the value to 3.
| There is no need to enter a Change Handler parameter name.
| When you are finished, the Property inspector should look like the following:

For more information about using API methods to change additional properties, see FComboBox (component) in the ActionScript Dictionary.

Configure the push buttons

1 | Select the PushButton component in Frame 1.
| The component's parameters are displayed in the Property inspector.
2 | Type submit_btn in the Property inspector Instance Name text box.
3 | Type Submit in the Property inspector Label text box.
| This text is displayed in the body of the button.
4 | Type onClick for the Click Handler name. Later you will write ActionScript to define what the Click Handler should do.
| When you are finished, the Property inspector should look like the following:
5 | Select the PushButton component in Frame 6.
6 | Type return_btn in the Property inspector Instance Name text box.
7 | Type Return in the Property inspector Label text box.
8 | Type onClick for the Click Handler name.

For more information about using the API methods of the FPushButton component to change additional properties, see FPushButton (component) in the ActionScript Dictionary.