Adobe Extending Flash Professional CS4 Manuale Utente Pagina 291

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 560
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 290
269
EXTENDING FLASH CS4 PROFESSIONAL
FLfile object
Example
The following example converts a filename from a platform-specific format to a file:/// URI, which is passed to
outputPanel.save():
var myFilename = "C:\\outputPanel.txt";
var myURI=FLfile.platformPathToURI(myFilename);
fl.outputPanel.save(myURI);
See also
FLfile.uriToPlatformPath()
FLfile.read()
Availability
Flash MX 2004 7.2.
Usage
FLfile.read()
Parameters
fileOrFolderURI A string, expressed as a file:/// URI, specifying the file or folder whose attributes you want to
retrieve.
Returns
The contents of the specified file as a string, or null if the read fails.
Description
Method; returns the contents of the specified file as a string, or null if the read fails.
Examples
The following example reads the file mydata.txt and, if successful, displays an alert box with the contents of the file.
var fileURI = "file:///c|/temp/mydata.txt";
var str = FLfile.read( fileURI);
if (str) {
alert( fileURL + " contains: " + str);
}
The following example reads the ActionScript code from a class file and stores it in the code variable:
var classFileURI = "file:///C|/MyApplication/TextCarousel.as";
var code = FLfile.read(classFileURI);
FLfile.remove()
Availability
Flash MX 2004 7.2.
Vedere la pagina 290
1 2 ... 286 287 288 289 290 291 292 293 294 295 296 ... 559 560

Commenti su questo manuale

Nessun commento