Validating and Submitting Flash Forms
Today we write our own ActionScript function to validate our Flash form. We see how the Flash form components have methods that we can use to access the values of the form components, be they combo boxes, list boxes, check boxes or simple text inputs.
In order to make our validation meaningful and complete, we clean up the form input by stripping leading and trailing white space from the input, as well as performing some basic testing to see if an email address is in the correct format. Because these functions are not native to ActionScript, we import them from external sources.
For people that filled the form in incorrectly, we build a dialog that displays the problems with the person's data entry. Once the data is validated, we build some root variables that contained the valid data and then send the information to a PHP script.
This is suitable for intermediate Flash developers, as it builds upon two previous beginner's tutorials, but reading those is not necessary, and the .FLA files are provided for download.
Read More