In many respects, building a dynamic Flash application is no different from building a similar application in Dreamweaver MX 2004. Both pull content from a database, both have to pull that content through ColdFusion, and both display the content in a browser. They differ in the way they communicate with the server and the browser. If the dynamic application is assembled in Dreamweaver, the information has to move through the HTTP Communication layer discussed in Chapter 5, "Planning the Look." Flash does it a bit differently. Remoting uses a technology called Action Message Format (AMF), which enables Flash to communicate directly with ColdFusion, thus bypassing the HTTP Communication Layer completely. This makes testing on your computer a breeze , and it is why dynamic Flash presentations are so fast. Having established that the process is not unfamiliar, here are some of the advantages Flash Remoting offers you:
The TechnologyThe Flash Remoting Communication process is actually quite simple. All communication is done through AMF calls between Flash and ColdFusion, as shown in Figure 9.1. The Flash Remoting service, for want of a better description, "sits" on top of the ColdFusion MX server and sends requests to the ColdFusion MX Server and data from ColdFusion MX back to Flash MX 2004. This data can be in the form of strings (your last name is an example of this), numbers , lists (called arrays), objects, recordsets from databases, and a lot more. For all this to occur, you need to have the Flash Remoting Components installed on your computer. If you have ColdFusion installed, then they are already there. If not, point your browser to http://www.macromedia.com/software/flashremoting/downloads/components/ to download and install the latest versions of the Flash Remoting Components . Figure 9.1. All data passes from Flash through the Flash Remoting Service, which passes information to ColdFusion MX or from ColdFusion MX back to the Flash movie on the user 's computer.
The components consist of all the necessary ActionScript you need to get your Flash movie connected to ColdFusion in as painless a manner as possible. There is also a really neat toolthe NetConnection debuggerthat enables you to watch and trace events on both your computer and the server. The Technical RequirementsObviously, you will need a few things to get yourself going with Flash Remoting. They are:
|