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
.
NO
TE
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
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...