Accessibility

Table of Contents

Employee Updater: Building a Client-Server Application with Macromedia Flash Data Connection Wizard and ColdFusion

Preparing Flash

Use the following steps to prepare Flash.

  1. Start Flash MX Professional 2004. Create a Flash Form Application by selecting File > New > Flash Form Application.
  2. Save the file as employees.fla in the cfflash application directory.
  3. Flash Form Applications comprise multiple screens that you can display and hide. The screens (forms) appear in a tree view to the left of the Stage. By default, Flash names the top level form application, and creates a child form named form1. Double-click the child form name and rename it data, as this form will contain the data grids. Your screen will look like Figure 2.
  4. Save the changes.
Flash Forms applications are made up of multiple screens (forms) arranged in an hierarchical view

Figure 2. Flash Forms Applications are made up of multiple screens (forms) arranged in an hierarchical view

Before you can use the ColdFusion component you just created, Flash needs to know about it (the CFC's name, location, method details, and more). To register the ColdFusion component with Flash, follow these steps:

  1. Select Window > Development Panels > Web Services to display the Web Services panel (Figure 3).

    Registered Web Services are listed in the Web Services panel

    Figure 3. Registered web services are listed in the Web Services panel

  2. Click the Define Web Services button (the globe icon) to display the Define Web Services dialog box.
  3. Click the Plus (+) button to add a new web service, and then provide the URL to the CFC you just created. If you are using ColdFusion's integrated HTTP server on the default port 8500 and the cfflash path in the steps above, then the URL will be http://localhost:8500/cfflash/employees.cfc?wsdl (see Figure 4). Click OK.

    Web Services must be registered before they may be used in the Wizards

    Figure 4. Register a web service before using it in the wizards.

  4. Flash connects to the specified URL to obtain CFC information; it then returns to the previous screen displaying the newly defined web service (the CFC).
  5. Close the Web Services panel.