About File Uploading And Downloading - MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

About file uploading and downloading

The FileReference class lets you add the ability to upload and download files between a client
and server. Your users can upload or download files between their computer and a server.
Users are prompted to select a file to upload or a location for download in a dialog box (such
as the Open dialog box on the Windows operating system).
Each FileReference object that you create with ActionScript refers to a single file on the user's
hard disk. The object has properties that contain information about the file's size, type, name,
creation date, and modification date. On the Macintosh, there is also a property for the file's
creator type.
You can create an instance of the FileReference class in two ways. You can use the following
operator:
new
import flash.net.FileReference;
var myFileReference:FileReference = new FileReference();
Or, you can call the
FileReferenceList.browse()
the user's system to prompt the user to select a file to upload and then creates an array of
FileReference objects if the user selects one or more files successfully. Each FileReference
object represents a file selected by the user from the dialog box. A FileReference object does
not contain any data in the FileReference properties (such as
) until the
modificationDate
FileReferenceList.browse()
the file picker or until the
from the file picker.
FileReference.browse()
the user select multiple files.
After a successful call to the
one file at a time.
644
Working with External Data
FileReference.browse()
method has been called and the user has selected a file from
FileReference.download()
lets the user select a single file.
method, you call
browse()
method, which opens a dialog box on
,
, or
name
size
method or
method has been used to select a file
FileReferenceList.browse()
FileReference.upload()
lets
to upload

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents