EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Onselect (Filereference.onselect Event Listener)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 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...
FileReference (flash.net.FileReference) 577
trace("onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: " +
bytesTotal);
}
listener.onComplete = function(file:FileReference):Void {
trace("onComplete: " + file.name);
}
listener.onHTTPError = function(file:FileReference):Void {
trace("onHTTPError: " + file.name);
}
listener.onIOError = function(file:FileReference):Void {
trace("onIOError: " + file.name);
}
listener.onSecurityError = function(file:FileReference,
errorString:String):Void {
trace("onSecurityError: " + file.name + " errorString: " + errorString);
}
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
fileRef.browse();
onSelect (FileReference.onSelect event listener)
onSelect = function(fileRef:FileReference) {}
Invoked when the user selects a file to upload or download from the file-browsing dialog box.
(This dialog box is displayed when you call
FileReference.browse(),
FileReferenceList.browse(), or FileReference.download().) When the user selects a
file and confirms the operation (for example, by clicking OK), the properties of the
FileReference object are populated.
The
onSelect listener works slightly differently depending on what method invokes it. When
onSelect is invoked after a browse() call, Flash Player can read all of the FileReference
object's properties, because the file selected by the user is on the local file system. When
onSelect is invoked after a download() call, Flash Player can read only the name property,
because the file hasn't yet been downloaded to the local file system at the moment
onSelect
is invoked. When the file has been downloaded and
onComplete invoked, then Flash Player
can read all other properties of the FileReference object.
Availability: ActionScript 1.0; Flash Player 8

Table of Contents

Related product manuals