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

Actionscript 2.0 language reference
Table of Contents

Advertisement

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
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();
564
ActionScript classes
.
null

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