Packageflash.net
Classpublic class FileReference
InheritanceFileReference Inheritance Object

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

The FileReference class provides a means to upload and download files between a user's computer and a server. An operating-system dialog box prompts the user to select a file to upload or a location for download. Each FileReference object refers to a single file on the user's disk and has properties that contain information about the file's size, type, name, creation date, modification date, and creator type (Macintosh only).



Public Properties
 PropertyDefined By
  creationDate : Date
[read-only] [creationDate description]
FileReference
  creator : String
[read-only] [creationDate description]
FileReference
  data : ByteArray
[read-only] [creationDate description]
FileReference
  AIR-only extension : String
[read-only] The filename extension.
FileReference
  modificationDate : Date
[read-only] [creationDate description]
FileReference
  name : String
[read-only] [creationDate description]
FileReference
  size : Number
[read-only] [creationDate description]
FileReference
  type : String
[read-only] [creationDate description]
FileReference
Public Methods
 MethodDefined By
  
Creates a new FileReference object.
FileReference
 Inherited
_init():*
[static]
_init
  
AIR-only browse(typeFilter:Array = null):Boolean
[browse description]
FileReference
  
[browseOverride description]
FileReference
 Inherited
AS3
 Inherited
init():*
[static]
init
  
[static] Native dummy function.
FileReference
  
Native dummy function.
FileReference
 Inherited
AS3
  
load():void
FileReference
 Inherited
AS3
  
save(data:*, defaultFileName:String = null):void
FileReference
  
saveOverride(filename:String, data:*):void
FileReference
  
FileReference
Protected Methods
 MethodDefined By
 Inherited
[static]
protected
 Inherited
_setPropertyIsEnumerable(o:*, V:String, enumerable:Boolean):void
[static]
protected
Public Constants
 ConstantDefined By
 Inheritedlength : int = 1
[static]
length
Property Detail
creationDateproperty
creationDate:Date  [read-only]

[creationDate description]


Implementation
    public function get creationDate():Date
creatorproperty 
creator:String  [read-only]

[creationDate description]


Implementation
    public function get creator():String
dataproperty 
data:ByteArray  [read-only]

[creationDate description]


Implementation
    public function get data():ByteArray
AIR-only extensionproperty 
extension:String  [read-only]

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0

The filename extension.

A file's extension is the part of the name following (and not including) the final dot ("."). If there is no dot in the filename, the extension is null.

Note: You should use the extension property to determine a file's type; do not use the creator or type properties. You should consider the creator and type properties to be considered deprecated. They apply to older versions of Mac OS.


Implementation
    public function get extension():String

Throws
IllegalOperationError — If the reference is not initialized.
modificationDateproperty 
modificationDate:Date  [read-only]

[creationDate description]


Implementation
    public function get modificationDate():Date
nameproperty 
name:String  [read-only]

[creationDate description]


Implementation
    public function get name():String
sizeproperty 
size:Number  [read-only]

[creationDate description]


Implementation
    public function get size():Number
typeproperty 
type:String  [read-only]

[creationDate description]


Implementation
    public function get type():String
Constructor Detail
FileReference()Constructor
public function FileReference()

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

Creates a new FileReference object. When populated, a FileReference object represents a file on the user's local disk.

Method Detail
AIR-only browse()method
public function browse(typeFilter:Array = null):Boolean

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0

[browse description]

Parameters

typeFilter:Array (default = null) — [description]

Returns
Boolean — [description]
AVM-only browseOverride()method 
AVM2 function browseOverride(filename:String):Boolean

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

[browseOverride description]

Parameters

filename:String — [description]

Returns
Boolean — [description]
AVM-only isDummy()method 
public static function isDummy():Boolean

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Native dummy function.

Returns
Boolean
AVM-only isLocalDummy()method 
public function isLocalDummy():Boolean

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Native dummy function.

Returns
Boolean
load()method 
public function load():void

save()method 
public function save(data:*, defaultFileName:String = null):void

Parameters

data:*
 
defaultFileName:String (default = null)

saveOverride()method 
AVM2 function saveOverride(filename:String, data:*):void

Parameters

filename:String
 
data:*

uploadUnencoded()method 
public function uploadUnencoded(request:URLRequest):void

Parameters

request:URLRequest