Adobe ColdFusion 8

Building a simple application

The following procedure describes how to build a simple server-side ActionScript application. The example application, a corporate personnel directory, uses the NetServices object to connect to the personneldirectory server-side ActionScript. The personneldirectory server-side ActionScript retrieves data from a ColdFusion data source and returns the results to the Flash application as a RecordSet object.

Note: The server-side ActionScript application that you create provides the back-end services in an application.

This example requires the following:

  • A server-side ActionScript file named personneldirectory.asr that includes functions that interact with a ColdFusion data source.
  • A client-side Flash movie in which the NetServices object is created.

Create the application

  1. Write server-side ActionScript that performs the database query and returns data to the client through the Flash Remoting service.
  2. Create the Flash movie interface. See Creating the Flash movie interface.
  3. Define a search function that sends user data to the Flash Remoting service. See Submitting user data to the Flash Remoting service.
  4. Define a result function that captures the results returned from the Flash Remoting service. See .
  5. Ensure that the Flash movie has established a connection to the Flash Remoting service. See Checking for a Flash Remoting service connection.