Chapter 15. Client Data Communication

Flex applications are capable of many types of data communication, from the simple to the complex. Often when we think of data communication in Flex applications, we think of client-server communications such as RPCs. However, some types of data communication occur entirely on the client side, and these types are the subject of this chapter.

At a minimum, all Flex applications require a client-side element in the form of a .swf file running in Flash Player. Some Flex applications even use several .swf files running in one or more instances of Flash Player on the client machine. The client-side portion of a Flex application is capable of several types of client data communication intended for a variety of purposes.

There are three ways a Flex application can run data communications on the client:

Local connections

A local connection allows two .swf files to communicate as long as they are running on the same client machine at the same time. The .swf files can be running in two different instances of Flash Player. They can even be running in different host environments. For example, one .swf can be running in a web browser while one is running embedded within an executable.

Shared objects

Local shared objects allow the application to store and retrieve persistent data on the client machine. For example, a user can save preferences that the application can retrieve automatically the next time the application runs.

External interface

The external interface ...

Get Programming Flex 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.