How to process data from an input
text field:
- Select the "Text
tool".
- Then in the properties panel:
- Set the text field type to
"input".
- On stage create the text field
and position.
- In the properties panel:
- Set the instance name of the
text field to "number_input".
- Set the variable name to "input".
- Click on the stage area.
- In the properties panel:
- Set the text field type to
"Dynamic"
- On stage create the text
field and position.
- In the properties panel:
- Set the instance name
of the text field to "number_output".
- Set the variable name to "output".
- In the timeline:
- Select the first frame
of the "action" layer.
- Then open the actionscript panel
and enter the following script:
enter_btn.onRelease = function(){
output = 5*input;
}
- In the main menu go to Control
> Test Movie.
|