STF.getSpecialFolder()
Availability
Flash Player 6 + ScreenTime
3.0 /
3.0.
Usage
STF.getSpecialFolder(folderName:String) : String
Parameters
folderName - Name of the folder path to retrieve - one of the following values.
- "USER_APPLICATIONS" - Depending on the OS, this returns the path to the user's Applications (Mac) or Programs (Windows) folder.
- "COMMON_APPLICATIONS" - Depending on the OS, this returns the path to the common Applications (Mac) or Programs (Windows) folder.
- "CACHES" - Mac ONLY - Returns the path to the user's Cache folder.
- "DESKTOP" - Returns the path to the user's Desktop folder.
- "DOCUMENTS" - Depending on the OS, this returns the path to the user's Documents (Mac) or "My Documents" (Windows) folder.
- "HOME" - Mac ONLY - Local returns the location where applications store data by default.
- "LIBRARY" - Mac ONLY - Returns the path to the user's Library folder.
- "MYAPP" - Returns the path to the folder containing the application or in this case the screen saver.
- "MYDOCUMENTS" - Depending on the OS, this returns the path to the user's Documents (Mac) or "My Documents" (Windows) folder.
- "MYPICTURES" - Depending on the OS, this returns the path to the user's Pictures (Mac) or "My Pictures" (Windows) folder.
- "PICTURES" - Depending on the OS, this returns the path to the user's Pictures (Mac) or "My Pictures" (Windows) folder.
- "PREFERENCES" - Mac ONLY - Returns the path to the user's Preferences folder.
- "PROGRAMS" - Depending on the OS, this returns the path to the user's Applications (Mac) or Programs (Windows) folder.
- "ROOTSWF" - Returns the path to the main application SWFs folder.
- "SCREENSAVERS" - Mac ONLY - Returns the path to the user's screen savers folder.
- "STARTMENU" - Windows ONLY - Returns the path of the Start Menu folder. To add an application to the Windows Start menu, add a shortcut to this directory. .
- "STARTUP" - Windows ONLY - Returns the path of the Startup folder. Placing a shortcut to your application in this folder will cause Windows to it launch when the user reboots the computer.
- "SYSTEM" - Windows ONLY - Returns the location of the Windows root system directory.
- "WINDOWS" - Windows ONLY - Returns the path to the Windows folder.
- "WORKING" - Returns the path to the folder containing the included external files. On the Mac this location is inside the application bundle. On the PC this path is the same as the application path.
Returns
A string.; This value is returned as a parameter to the registered callback. See the example below or STF.registerCallBack() for more information on return variable handling.
Description
Method; Retrieves the path of a special folder.
Example
The following example returns the path to the user's Documents (Mac) or "My Documents" (Windows) folder.
var folder :String;
onGetSpecialFolderReturn = function(returnValue:String) { // define callback
folder = returnValue;
}
STF.registerCallBack("getSpecialFolder", onGetSpecialFolderReturn, this); // register callback function
STF.getSpecialFolder("Documents");