Adobe Extending Flash Professional CS5 Manual de usuario Pagina 288

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 565
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 287
266
EXTENDING FLASH PROFESSIONAL
FLfile object
Last updated 5/2/2011
See also
FLfile.remove(), FLfile.write()
FLfile.exists()
Availability
Flash MX 2004 7.2.
Usage
FLfile.exists(fileURI)
Parameters
fileURI A string, expressed as a file:/// URI, that specifies the file you want to verify.
Returns
A Boolean value of true if successful; false otherwise.
Description
Method; determines whether a specified file exists. If you specify a folder and a filename, the folder must already exist.
To create folders, see
FLfile.createFolder().
Examples
The following example checks for a file called mydata.txt in the temp folder and displays an alert box indicating
whether the file exists:
var fileURI = "file:///c|/temp/mydata.txt";
if (FLfile.exists(fileURI)) {
alert( fileURI + " exists.");
}
else {
alert( fileURI + " does not exist.");
}
The following example checks to see if a required configuration file exists in the MyApplication folder. If the file
doesn’t exist, it is created.
var configFile = "file:///C|/MyApplication/config.ini";
if (!FLfile.exists(configFile)) {
FLfile.write(configFile,"");
}
See also
FLfile.write()
Vista de pagina 287
1 2 ... 283 284 285 286 287 288 289 290 291 292 293 ... 564 565

Comentarios a estos manuales

Sin comentarios