- Creating and Sending eGreetings
- Preparing to Work
- Working with the Card Template
- Applying the Scrollbar
- Customizing the Scrollbar
- The eGreeting Interface
- Defining the Structure of the Database
- Using the LoadVars Object to Send Data
- Error Checking
- Setting Up and Testing the Email Program
- Displaying the Card for the Recipient
- Putting It All Together
Error Checking
Notice that before the Send button performs a sendAndLoad, there is a section of code that checks to make sure all required fields have been filled in. This is done before attempting to send data to the server-side script so that any obvious problems with the data can be corrected before the script is (needlessly) called. If, however, there is a great deal of error checking to be done or if it involves complex string manipulations, it might be more efficiently handled by the server-side script instead of bogging down the client's machine. In that case, one would simply send the data, let the server-side script thoroughly check it, and have it send back error codes indicating any problems, which the Flash movie would deal with accordingly.