Proxy ActionScript Classes for ColdFusion Services

Flex-based applications in AIR and Flash can access several ColdFusion services by using ColdFusion proxy ActionScript classes. This feature is available in all Flex-based applications that run on Flash and AIR. ColdFusion provides services corresponding to the following tags and their child subtags: cfchart, cfdocument, cfimage, cfmail, cfpdf, cfpop. Using ColdFusion you can also upload files from the application to the server.

ColdFusion provides the following Flex proxy classes and related support classes:

  • Config (configures the application for using ColdFusion services)

  • Util (includes file upload support)

  • Chart (cfchart)

  • Document (cfdocument)

  • Image (cfimage)

  • Mail (cfmail)

  • PDF (cfpdf)

  • Pop (cfpop)

These classes are part of coldfusion.service.mxml package, distributed in the cfservices.swc file. You normally use these classes in MXML tag format, using the cf namespace identifier, as in the following line:

<cf:Image id="image" action="AddBorder" source="Uploaded Image server URL" thickness="5" color="Blue"/>

To use a ColdFusion service in an application built with Flex, you use the Config class to establish the connection, and then use the other classes to access the ColdFusion services.

In ColdFusion 9, you can also specify the remoting destination in the Config class as well as all the proxy tags.

Note: To use ColdFusion services from Flex and AIR, you must enable access to the services as described in "Enabling ColdFusion Services" in the ColdFusion Web Services section.