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 MX 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 MX data source.
- A client-side Flash MX movie in which the NetServices object is created.
To create the application:
- Write server-side ActionScript that performs the database query and returns data to the client through the Flash Remoting service.
- Create the Flash movie interface. See Creating the Flash movie interface.
- Define a search function that sends user data to the Flash Remoting service. See Submitting user data to the Flash Remoting service.
- Define a result function that captures the results returned from the Flash Remoting service. See .
- Ensure that the Flash movie has established a connection to the Flash Remoting service. See Checking for a Flash Remoting service connection.
This section describes the following topics: