EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Chapter 16: Working with External Data

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
830 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
633
16
CHAPTER 16
Working with External Data
In Macromedia Flash Basic 8 and Macromedia Flash Professional 8, you can use ActionScript
to load data from external sources to a SWF file. You can also send data, which could be
provided by the user or the server, from a SWF file to an application server (such as
Macromedia ColdFusion or Macromedia JRun) or another type of server-side script, such as
PHP or Perl. Macromedia Flash Player can send and load data over HTTP or HTTPS or load
from a local text file. You can also create persistent TCP/IP socket connections for
applications that require low latency—for example, chat applications or stock quote services.
New in Flash Player 8 is the ability to upload files from the user’s computer to a server and
download files from a server to the users computer.
Data that you load into or send from a SWF file can be formatted as XML (Extensible
Markup Language) or as name-value pairs.
Flash Player can also send data to and receive data from its host environment—a web browser,
for example—or another instance of Flash Player on the same computer or web page.
By default, a SWF file can access only data that resides in exactly the same domain (for
example, www.macromedia.com). (For more information, see About domains, cross-domain
security, and SWF files” on page 694.)
For more information on working with external data, see the following topics:
Sending and loading variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .634
Using HTTP to connect to server-side scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .638
About file uploading and downloading. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644
About XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .652
Sending messages to and from Flash Player. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .663
About the External API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .667

Table of Contents

Related product manuals