Last week we learned how we could build a form in Flash using the built-in components that Flash provides. The main problem we had with the form was that the form components that provided selections had their values hard coded within the Flash MX editor.
In most situations this isn't a big problem, but in the case of our Country combo box, 200+ countries is too many to type in. Or what about a drop-down menu of products, when the product list changes daily? Today we'll look at how we can make the form more dynamic. To do this we'll look at some of the ActionScript methods that we have for altering the form components, and how we can grab the data for them from a PHP script.
This is article 2 in a series of 3:
1: Flash Forms
Creating basic form elements in Flash
2: Dynamic Form Data
Populating form elements in Flash from a dynamic source.
The database is MySQL and the populating scripts are built in PHP.
3: Form Submission
Covers Flash form validation using ActionScript and submitting the data to a server.
The form submission script is written in PHP and submits the data to a MySQL server
For those of you who didn't read last week's article, the Flash MX movie form_base.fla is available for download that contains the results of following the previous tutorial.
Read More