EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Page 645

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...
About file uploading and downloading 645
You can also add download functionality to your Flash application. The
FileReference.download() method prompts end users for a location on their hard disks to
save a file from a server. This method also initiates downloading from a remote URL. When
using the
download() method, only the FileReference.name property is accessible when
the
onSelect event is dispatched. The rest of the properties are not accessible until the
onComplete event is dispatched.
For information on the functionality and security of the FileReference API, see About
FileReference API functionality and security” on page 646. For an example of an application
that uses the FileReference API, see Adding file upload functionality to an application
on page 646. You can find the sample source file for this example, FileUpload.fla, in the
Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\FileUpload.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/FileUpload.
For information on each method, property, and event of the FileReference API, see
FileReference (flash.net.FileReference) and FileReferenceList
(flash.net.FileReferenceList)
in the ActionScript 2.0 Language Reference.
NOTE
When a dialog box appears on the end-user’s computer, the default location that
appears in the dialog box is the most recently browsed folder (if that location can be
determined) or the desktop (if the recent folder cannot be determined). The
FileReference and FileReferenceList APIs do not let you set the default file location

Table of Contents

Related product manuals