Using the Flash Remoting service of ColdFusion, ColdFusion developers can work with Flash MX 2004 designers to build Flash user interfaces (UIs) for ColdFusion applications. Building Flash UIs requires the separation of user interface code from business logic code. You build user interface controls in Flash, and you build the business logic in ColdFusion.
The following is a simplified representation of the relationship between Flash and ColdFusion:

Planning your SWF application

When you are planning ColdFusion application development with Flash UIs, remember the importance of separating display code from business logic. Separating display code from business logic enables your ColdFusion applications to interact with multiple client types, such as SWF applications, web browsers, and web services.
When you build ColdFusion applications for multiple clients, your ColdFusion pages and components return common data types, including strings, integers, query objects, structures, and arrays. Clients that receive the results can process the passed data according to the client type, such as ActionScript with Flash, or CFML with ColdFusion.
To use the Flash Remoting service with ColdFusion, you build ColdFusion pages and components or deploy Java objects. In ColdFusion pages, you use the Flash variable scope to interact with SWF applications. ColdFusion components (CFCs) natively support Flash interaction. The public methods of Java objects are also available to the Flash Remoting service.
The Flash Remoting ActionScript API has been updated to comply with ActionScript 2.0. The ActionScript 2.0 version of the API consists of the following significant features:

Flash Remoting MX 2004 ActionScript 2.0 API Features

Enforcement of strict data typing, which requires you to declare the data types of variables and prohibits you from assigning different types of data to them.

Enforcement of case sensitivity, which means that myvar and myVar are two different variables, though they were considered the same variable with different spellings in ActionScript 1.0.

A new Service class, which lets you create a gateway connection and at the same time obtain a reference to a service and its methods. It includes the connection property, which returns the connection and also lets you set credentials for authorization on the remote server.Note: The NetServices class is still supported but has been deprecated in favor of the new Service and Connection classes

A new Connection class that helps you create and use Flash Remoting connections.Note: The Connection class supersedes the former NetConnection class.

A new PendingCall object returned on each call to a service method that is run using the Service object. The PendingCall object contains the responder property, which you use to specify the methods to handle the results of the service call.

A new RelayResponder class, which specifies the methods to which the result and fault outcomes of a service call are relayed.

A RecordSet object that contains new properties (columnNames, items, and length), new methods (clear(), contains(), editField(), getEditingData(), getIterator(), getLocalLength(), getRemoteLength(), isEmpty(), and sortItems()), and the new modelChanged event.

For more information on the ActionScript 2.0 Flash Remoting API, see Flash Remoting ActionScript Dictionary Help.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy