CHAPTER 14
1 4
Networking and
Communication
The flash.net package contains classes to send and receive data across the Internet-for
example, to load content from remote URLs, to communicate with other Flash Player
instances, and to connect to remote websites. In earlier versions of ActionScript, many of the
classes within the flash.net package were top-level classes. In ActionScript 3.0, many of these
classes have been moved into the flash.net package.
The flash.net package contains the following classes: FileReference, LocalConnection,
NetConnection, NetStream, SharedObject, Socket, URLLoader, URLRequest, URLStream,
URLVariables, and XMLSocket. flash.net contains four methods:
,
navigateToURL()
, and
.
sendToURL(), registerClassAlias()
getClassByAlias()
This chapter explains how to enable your SWF file to communicate with external files and
other Adobe Flash Player 9 instances. It also explains how to load data from external sources,
send messages between a Java server and Flash Player, and perform file uploads and downloads
using the FileReference and FileReferenceList classes.
Contents
Socket connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385
Storing local data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
371