Interactivity on the Web reaches perhaps its loftiest status in the guise of the fill-in form. Okay, that might sound a little hyperbolic, but it’s not meant to be. Forms may appear trivial on the surface, but they are at the heart of online communities (chat rooms and message boards), the persistence of data (personalization), and of course, the saliva-in-the-jaws-of-business, e-commerce (buying and selling online).
Flash 4 was the first version of Flash to include forms support. Since then, Flash has gained many powerful means of communicating with a server. This chapter explores the basics of using forms in Flash, from capturing user input and displaying output within Flash, to sending data to a server and receiving the server’s response. More advanced topics, such as XML handling, are covered in Part III.
Before we delve into the particulars, let’s take a macroscopic look at the typical steps in a form submission process:
Flash receives data as user input.
Flash prepares data for submission to the web server (collects and validates variables).
Flash sends data to the web server via HTTP (or, optionally, HTTPS).
The web server receives data, passes it to a server-side data-handling application (e.g., Perl script, PHP script, Cold Fusion, or ASP).
The data-handling application parses and processes submitted data.
The data-handling application passes results to the web server, which sends results to Flash.
Flash stores and optionally displays ...