Chapter 23. Communicating with Server‐Side Technologies
Introduction
In this chapter
Communicating through the URLLoader
Using XMLSocket
Understanding Flash Remoting
In the parlance of the Web, we refer to anything that happens on the user's computer as client‐side and anything that happens on the server as server‐side. Flash Player itself is a client‐side technology because the movie is downloaded onto the user's machine before it is viewed. HTML, CSS, and AJAX are all client‐side technologies that are run locally; however, they frequently communicate with a server‐side technology to request data in the form of text, images, or video. The range of client‐side technologies is quite vast and pretty much any problem has a solution in each different technology. Which technology you choose is up to you, as is the fashion in which your SWF file communicates with the server. In this chapter, you look at some of the different ways that Flash can communicate with a server, and some of the different ways that server‐side technologies can send information to the Flash Player.
Communicating via URLLoader
The simplest way of communicating with a server is via the URLLoader
class. From the server‐side perspective, something sends the server a request, the server processes it, and then the server writes everything out to the page that was requested. From the perspective of the SWF file, the SWF sends information to a URL and waits for it to have something written out to it. Once something is written ...
Get ActionScript™ 3.0 Bible 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.