Using built-in Flash UI components to create forms
- Display the Components window
- Drag components onto the stage
- Name the components in the Properties Inspector.
- Double click the Labels property to change the words that appear in or on
the component. Combo and List boxes need to have
both labels and data values set.
- Create your ActionScript functions that determine
what will happen when the form elements are clicked.
- Make the Change Handler property of each component say the name of the function
you are using to respond to it. (see below)
Here's an example:
Elements on the form:
- 5 check boxes
- 1 combo box
- 2 static text areas
- 1 dynamic text area
- 1 push button
- each time a check box is checked, add one to the count
- each time a check box is unchecked, subtract one from the count
- when the push button is clicked:
- if count = 5 and you picked Macromedia then dynamic text says
"you got it"
- otherwise it says "not yet"
Click here for an explanation of the code used.