| Previous | Next | |
Windows: Flash 8 or 9 AS2.0 SWF + mProjector
3.0; Windows 98/ME/NT Support: Flash 7 SWF + mProjector
2.0;
Macintosh: Flash 8 or 9 AS2.0 SWF + mProjector
2.0; replacing mProjector
1.0 async
mFile.createShortcut(targetFile:String, arguments:String, shortcutFile:String, description:String, iconFile:String, iconNumber:Number) : BooleantargetFile - Name (including the full path) of the file the shortcut should point to.
arguments - WINDOWS ONLY - Command-line arguments for the targetFile file. This argument is ignored on the Mac.
shortcutFile - Name and location of the shortcut. On Windows the shortcut must have an .lnk extension.
description - WINDOWS ONLY - Description of the shortcut. This argument is ignored on the Mac.
iconFile - WINDOWS ONLY - Name (including the path) of the file containing the icon to be used for this shortcut. This argument is ignored on the Mac.
iconNumber - WINDOWS ONLY - Ordinal number of the icon within the iconFile. This argument is ignored on the Mac.
A boolean.; ;
Method; Creates a shortcut to an existing file. Platform Implementation Differences: On Windows the file name must include a fully qualified path. On the Mac if no path is specified, the working directory is used.
The following example creates an iTunes shortcut on the Windows desktop.
var programFilesPath:String = mSystem.getSpecialFolder("PROGRAM_FILES")
var desktopPath:String = mSystem.getSpecialFolder("DESKTOP");
var shortcutFilename: String;
var pathDelimiter:String = mSystem.getPathDelimiter();
if (mSystem.isMac()) {
shortcutFilename = pathDelimiter + "iTunes";
} else if (mSystem.isWindows()) {
shortcutFilename = pathDelimiter + "iTunes.lnk"; // windows shortcuts require ".lnk" extension
}
mFile.createShortcut(programFilesPath+pathDelimiter + "iTunes"+pathDelimiter + "iTunes.exe","",desktopPath+shortcutFilename,"Shortcut","",0);Desktop Shortcut and Start Menu Support, Creating an Installer, mProjector Class Basics -- mFile
| Questions or Feedback? | Previous | Next |