EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Creationdate (Filereference.creationdate Property)

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...
564 ActionScript classes
Example
The following example downloads approximately half of the requested file and then cancels
the download. This is obviously not a typical usage. You might more often use this method to
allow users to click Cancel in a download status dialog box.
import flash.net.FileReference;
var listener:Object = new Object();
listener.onProgress = function(file:FileReference, bytesLoaded:Number,
bytesTotal:Number):Void {
trace("onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: " +
bytesTotal);
if(bytesLoaded >= (bytesTotal / 2)) {
file.cancel();
}
}
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
var url:String = "http://www.macromedia.com/platform/whitepapers/
platform_overview.pdf";
fileRef.download(url, "FlashPlatform.pdf");
creationDate (FileReference.creationDate property)
public creationDate : Date [read-only]
The creation date of the file on the local disk. If the FileReference object has not been
populated, a call to get the value of this property returns
null.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example retrieves the creation date of a file selected by the user.
import flash.net.FileReference;
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void {
trace("creationDate: " + file.creationDate);
}
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
fileRef.browse();

Table of Contents

Related product manuals