MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 566

Actionscript 2.0 language reference
Table of Contents

Advertisement

When the file has successfully downloaded, the properties of the FileReference object are
populated with the properties of the local file and the
Only one
or
browse()
dialog box can be displayed at a time).
This method supports downloading of any file type, with either HTTP or HTTPS. You can
also send data to the server with the
for the server script to parse.
If your server requires user authentication, only SWF files that are running in a browser—
that is, using the browser plug-in or ActiveX control—can provide a dialog box to prompt
the user for a user name and password for authentication, and only for downloads. For
uploads using the plug-in or ActiveX control, and for uploads and downloads using the
stand-alone or external player, the file transfer fails.
When using this method, consider the Flash Player security model:
Not allowed if the calling SWF file is in an untrusted local sandbox.
The default is to deny access between sandboxes. A website can enable access to a resource
by adding a cross-domain policy file.
For more information, see the following:
Chapter 17, "Understanding Security," in Learning ActionScript 2.0 in Flash
The Flash Player 8 Security white paper at http://www.macromedia.com/go/fp8_security
The Flash Player 8 Security-Related API white paper at http://www.macromedia.com/go/
fp8_security_apis
Availability: ActionScript 1.0; Flash Player 8
Parameters
- The URL of the file to download to the local computer. You can send data to
url:String
the server with the
download()
to parse. For example:
On some browsers, URL strings are limited in length. Lengths greater than 256 characters
may fail on some browsers or servers.
defaultFileName:String
the file to be downloaded. This string cannot contain the following characters: / \ : * ? " < > |
%
If you omit this parameter, the filename of the remote URL is parsed out and used as the
default.
566
ActionScript classes
session can be performed at a time (because only one
download()
download()
call by appending parameters to the URL, for the server script
http://www.myserver.com/picture.jpg?userID=jdoe
[optional] - The default filename displayed in the dialog box, for
listener is invoked.
onComplete
call by appending parameters to the URL,

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF