Building A Simple Application - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

These functions are available for every RecordSet object returned by the
Flash MX client. You invoke these functions as follows:
objectName.functionName();
For example, in the result function that you create to handle record set data returned by the
function, you can reference the database column names returned in the record set using
CF.query
the
getColumnNames
function selectData_Result ( result )
{
//result holds the query data; employeesView is a Flash list box
stringOutput.text = result.getColumnNames();
_root.employeesView.setDataProvider(result);
}

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
ActionScript retrieves data from a ColdFusion MX data source and returns the results to the Flash
movie 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
1
through the Flash Remoting service.
Create the Flash movie interface. See
2
Define a search function that sends user data to the Flash Remoting service. See
3
user data to the Flash Remoting service" on page
Define a result function that captures the results returned from the Flash Remoting service. See
4
"" on page
662.
Ensure that the Flash movie has established a connection to the Flash Remoting service. See
5
"Checking for a Flash Remoting service connection" on page
660
Chapter 30: Using Server-Side ActionScript
RecordSet function:
server-side ActionScript. The
"Creating the Flash movie interface" on page
CF.query
personneldirectory
662.
663.
function to the
server-side
661.
"Submitting

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion mx

Table of Contents