User Guide

Table Of Contents
823
CHAPTER 34
Using Server-Side ActionScript
Macromedia ColdFusion MX server configuration includes the Macromedia Flash Remoting
service, a module that lets Macromedia Flash MX developers create server-side ActionScript.
These ActionScript files can directly access ColdFusion MX query and HTTP features through
two new ActionScript functions:
CF.query and CF.http.
Contents
About server-side ActionScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823
Connecting to the Flash Remoting service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826
Using server-side ActionScript functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827
Global and request scope objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829
About the CF.query function and data sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829
Using the CF.query function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831
Building a simple application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833
About the CF.http function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836
Using the CF.http function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837
About server-side ActionScript
ColdFusion MX includes a module called the Flash Remoting service that acts as a broker for
interactions between Flash MX and ColdFusion MX. Flash Remoting supports a range of object
types, and lets you reference an ActionScript file that lives on a ColdFusion server. You can
partition data-intensive operations on the server, while limiting the amount of network
transactions necessary to get data from the server to the client.
Flash developers can create server-side ActionScript files to access ColdFusion MX resources; they
do not have to learn CFML (ColdFusion Markup Language). This ability lets you logically
separate the Flash presentation elements of your applications from the business logic. You have
the option of creating ActionScript files that reside on the server to partition this processing away
from your client applications.