MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 567

Actionscript 2.0 language reference
Table of Contents

Advertisement

Returns
- A value of
Boolean
dialog box is not displayed, the method returns
displayed for any of the following reasons:
You did not pass a value for the
The parameters passed are of the incorrect type or format.
The
parameter has a length of 0.
url
A security violation occurred; that is, your SWF file attempted to access a file from a server
that is outside your SWF file's security sandbox.
Another browse session is already in progress. A browse session can be started by
FileReference.browse()
FileReference.download()
The protocol is not HTTP or HTTPS.
Example
The following example attempts to download a file using the
there are listeners for all of the events.
import flash.net.FileReference;
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void {
trace("onSelect: " + file.name);
}
listener.onCancel = function(file:FileReference):Void {
trace("onCancel");
}
listener.onOpen = function(file:FileReference):Void {
trace("onOpen: " + file.name);
}
listener.onProgress = function(file:FileReference, bytesLoaded:Number,
bytesTotal:Number):Void {
trace("onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: " +
bytesTotal);
}
listener.onComplete = function(file:FileReference):Void {
trace("onComplete: " + file.name);
}
if the dialog box in which a user can select a file is displayed. If the
true
parameter.
url
,
FileReferenceList.browse()
.
. The dialog box could fail to be
false
, or
download
FileReference (flash.net.FileReference)
method. Notice that
567

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF