Adobe Extending Flash Professional CS5 Uživatelský manuál Strana 292

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 565
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 291
270
EXTENDING FLASH PROFESSIONAL
FLfile object
Last updated 5/2/2011
// Make sure the specified files exist.
file1 = "file:///C|/MyApplication/MyApp.fla";
file2 = "file:///C|/MyApplication/MyApp.as";
modificationTime1 = FLfile.getModificationDate(file1);
modificationTime2 = FLfile.getModificationDate(file2) ;
if(modificationTime1 > modificationTime2) {
alert("File 2 is older than File 1") ;
}
else if(modificationTime1 < modificationTime2) {
alert("File 1 is older than File 2") ;
}
else {
alert("File 1 and File 2 were saved at the same time") ;
}
See also
FLfile.getCreationDate(), FLfile.getModificationDateObj()
FLfile.getModificationDateObj()
Availability
Flash MX 2004 7.2.
Usage
FLfile.getModificationDateObj(fileOrFolderURI)
Parameters
fileOrFolderURI A string, expressed as a file:/// URI, specifying the file or folder whose modification date and time
you want to retrieve as a JavaScript Date object.
Returns
A JavaScript Date object that represents the date and time when the specified file or folder was last modified. If the file
or folder doesn’t exist, the object contains information indicating that the file or folder was created at midnight GMT
on December 31, 1969.
Description
Method; returns a JavaScript Date object that represents the date and time when the specified file or folder was last
modified.
Example
The following example displays (in human-readable form) the date a file was last modified, in the Output panel:
// Make sure the specified file exists.
var file1Date = FLfile.getModificationDateObj("file:///c|/temp/file1.txt");
trace(file1Date);
See also
FLfile.getCreationDateObj(), FLfile.getModificationDate()
Zobrazit stránku 291
1 2 ... 287 288 289 290 291 292 293 294 295 296 297 ... 564 565

Komentáře k této Příručce

Žádné komentáře