03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

var url:String = "http://www.adobe.com/platform/whitepapers/<br />

platform_overview.pdf";<br />

var fileRef:File<strong>Reference</strong> = new File<strong>Reference</strong>();<br />

fileRef.addListener(listener);<br />

fileRef.download(url, "FlashPlatform.pdf");<br />

See also<br />

browse (File<strong>Reference</strong>.browse method)<br />

modificationDate (File<strong>Reference</strong>.modificationDate<br />

property)<br />

public modificationDate : Date [read-only]<br />

The date that the file on the local disk was last modified. If the File<strong>Reference</strong> object has not<br />

been populated, a call to get the value of this property returns null.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 8<br />

Example<br />

The following example retrieves the modificationDate of a file selected by the user.<br />

import flash.net.File<strong>Reference</strong>;<br />

var listener:Object = new Object();<br />

listener.onSelect = function(file:File<strong>Reference</strong>):Void {<br />

trace("modificationDate: " + file.modificationDate);<br />

}<br />

var fileRef:File<strong>Reference</strong> = new File<strong>Reference</strong>();<br />

fileRef.addListener(listener);<br />

fileRef.browse();<br />

See also<br />

browse (File<strong>Reference</strong>.browse method)<br />

name (File<strong>Reference</strong>.name property)<br />

public name : String [read-only]<br />

The name of the file on the local disk. If the File<strong>Reference</strong> object has not been populated, a<br />

call to get the value of this property returns null.<br />

All the properties of a File<strong>Reference</strong> object are populated by calling browse(). Unlike other<br />

File<strong>Reference</strong> properties, if you call download(), the name property is populated when<br />

onSelect is invoked.<br />

File<strong>Reference</strong> (flash.net.File<strong>Reference</strong>) 577

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!