
Remote objects
Flex
applications can also make use of Flash’s remoting
capabilities by using remote objects. To make this happen
the server code needs to support AMF requests. This is a
proprietary binary format. Thankfully, there are libraries
in each of the major languages to support AMF.
Directly through sockets
When all else fails you can use TCP/IP sockets directly and
support whatever binary or ASCII protocol you choose.
I’ll be showing only two examples in this chapter, but it’s im-
portant that you know just how many ways Flash and Flex can
communicate on the web.
Figure 5-1 shows how all of this fits together.
The HTML page loaded by the browser contains a reference to
the Flash SWF file that contains the Flex application. That Flex
application is loaded and run. It then makes requests directly
to the server using a variety of transport protocols.
In the remainder of this chapter, I’ll cover the POST/GET and
HTTP service methods of accessing the server. I’ll start with an
example of using the POST/GET method.
Figure 5-1. Flex-based network access
68 | Chapter 5: Working with the Server
Komentáře k této Příručce