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:
It works with all browsers.
The Flash Player is as close to being a universal standard as you can get in this business.
There are no plugins, apart from a current Flash Player, required.
The download times are quite fast compared to other technologies.
This technology can be deployed across devices such as cell phones, desktops, PDA's, and even gaming systems.
The 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.
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 tool?the NetConnection debugger?that enables you to watch and trace events on both your computer and the server.
Obviously, you will need a few things to get yourself going with Flash Remoting. They are:
The Flash Remoting Components.
ColdFusion MX. If you have a Windows version of the Studio MX 2004, a copy of ColdFusion MX was included on the installation CD. If you haven't installed ColdFusion MX, now would be a good time to do so. If you don't have a Windows version of the Studio, all the Flash Remoting software is available as a trial download from http://www.macromedia.com. Click the download button on the menu and you will be taken to the download area.
Flash MX 2004.
A database. Microsoft Access and MySQL are the two most common.