Dynamic Form Data

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.

$2.79
- OR -

Overview

Table of Content:

  • Populating the Combo Box
  • The database, the table and the very big fish
  • The countries.php script
  • Handling the XML in Flash
  • Populating the List Box
  • interests.php
  • In conclusion

Allan Kent

Allan KentAllan comes from Cape Town, South Africa. He has been implicated in writing for several WROX, glasshaus, Wiley and Apress publications, generally in the 'cool stuff that PHP can do' sections.

You can catch up with him at his website http://www.mediafrenzy.co.za.

See All Postings From Allan Kent >>

Reviews

Be the first to write a review

You must me logged in to write a review.