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(), sendToURL(), registerClassAlias(), and 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
Connecting to other Flash Player instances
Socket connections
Storing local data
Working with file upload and download
Example: Building a Telnet client
Example: Uploading and downloading files

Flex 2.01

Take a survey


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flex/201/html/17_Networking_and_communications_173_1.html