Adobe FLEX 2-PROGRAMMING ACTIONSCRIPT 3.0 Manual page 371

Programming actionscript 3.0
Table of Contents

Advertisement

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
Working with external data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Connecting to other Flash Player instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .379
Socket connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385
Storing local data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Working with file upload and download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Example: Building a Telnet client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Example: Uploading and downloading files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
371

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents