Adobe Extending Flash Professional CS5 Manuale Utente Pagina 293

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 565
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 292
271
EXTENDING FLASH PROFESSIONAL
FLfile object
Last updated 5/2/2011
FLfile.getSize()
Availability
Flash MX 2004 7.2.
Usage
FLfile.getSize(fileURI)
Parameters
fileURI A string, expressed as a file:/// URI, specifying the file whose size you want to retrieve.
Returns
An integer that represents the size of the specified file, in bytes, or 0 if the file doesn’t exist.
Description
Method; returns an integer that represents the size of the specified file, in bytes, or 0 if the file doesn’t exist. If the return
value is 0, you can use
FLfile.exists() to determine whether the file is a zero-byte file or the file doesn’t exist.
This method returns correct file size values only for files that are less than or equal to 2GB in size.
Example
The following example stores the size of the mydata.txt file in the fileSize variable:
var URL = "file:///c|/temp/mydata.txt";
var fileSize = FLfile.getSize(URL);
FLfile.listFolder()
Availability
Flash MX 2004 7.2.
Usage
FLfile.listFolder(folderURI [, filesOrDirectories])
Parameters
folderURI A string, expressed as a file:/// URI, specifying the folder whose contents you want to retrieve. You can
include a wildcard mask as part of folderURI. Valid wildcards are * (matches one or more characters) and ? (matches
a single character).
filesOrDirectories An optional string that specifies whether to return only filenames or only folder (directory)
names. If omitted, both filenames and folder names are returned. Acceptable values are
"files" and
"directories".
Returns
An array of strings representing the contents of the folder. If the folder doesn’t exist or if no files or folders match the
specified criteria, returns an empty array.
Vedere la pagina 292
1 2 ... 288 289 290 291 292 293 294 295 296 297 298 ... 564 565

Commenti su questo manuale

Nessun commento