Chapter 16
Cookies
Goals

We have established a reliable data link between client and server: a data structure is composed on the client and transmitted to the server. On the server, PHP parses it and responds to its contents by sending back an XML object to the receptive Flash client.

What is missing is depth: Flash creates the XML string from hard-coded fragments in an inflexible manner. Nor does not really use the XML response as data, but so far only as a trophy of successful communication, displayed as a string, not interpreted as data.

In this chapter we will fill out the picture by demonstrating a little intelligent use of the XML by Flash, as well as honest generation of an XML structure. Along the way we will also learn to set and read cookies.