Integrating Flash with Web Applications > Creating forms > Using variables in forms
Using variables in formsYou can use variables in a form to store user input. To set variables, you use editable text fields or assign actions to buttons in interface elements. For example, each item in a pop-up menu is a button with an action that sets a variable to indicate the selected item. You can assign a variable name to an input text field. The text field acts like a window that displays the value of that variable.
When you pass information to and from a server-side script, the variables in the Flash movie must match the variables in the script. For example, if the script expects a variable called password
, the text field into which users enter the password should be given the variable name password
.
Some scripts require hidden variables, which are variables that the user never sees. To create a hidden variable in Flash, you can set a variable on a frame in the movie clip that contains the other form elements. Hidden variables are sent to the server-side script along with any other variables set on the Timeline that contains the action that submits the form.