User Guide

Table Of Contents
About the CF.query function and data sources 829
Global and request scope objects
Global and request scope objects are implicitly available in all server-side ActionScript. The
following table describes these scope objects:
For more information about these scope objects, see the documentation on the javax.servlet class
at http://java.sun.com.
About the CF.query function and data sources
You use the CF.query function to populate Macromedia Flash MX movie elements with data
retrieved from a Macromedia ColdFusion MX data source. To use the
CF.query function you do
the following:
To pull data into your Flash MX movie from a ColdFusion MX data source:
1.
Create a server-side ActionScript file that performs queries against a ColdFusion MX data
source.
2.
Write ActionScript code in your Flash MX movie that references your ActionScript file (.asr)
on the ColdFusion server.
You create server-side ActionScript to execute the query and return the data in a record set to the
client—your Flash MX movie. You can use methods in the RecordSet ActionScript object on the
client to manipulate data in the record set and present data in your Flash MX movie.
Note: Client-side ActionScript files use the .as extension. Server-side ActionScript files use the .asr
(ActionScript remote) extension.
Scope name Type Description
config Global Initialization information for the server-side ActionScript adapter.
Class:
javax.servlet.ServletConfig
application Global The context for the current web application. The context defines methods
that provide, for example, the MIME type of a file that can be used to write
to a log file. There is one context per web application.
Class:
javax.servlet.ServletContext
request Request An object containing client request information. The object provides data,
including parameter name and values, attributes, and an input stream.
Class:
HttpServletRequest (subtype of javax.servlet.ServletRequest)
response Request An object to assist in sending a response to the client. It provides HTTP-
specific functionality in sending a response. Do not use the OutputStream
or PrintWriter to send data back to the client.
Class:
HttpServletResponse (subtype of
javax.servlet.ServletResponse)