STF.getSpecialFolder()

Availability

Flash AS2.0 SWF w/ ScreenTimeScreenSaver component + 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.

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 programsPath = mSystem.getProgramsFolder();

var myName = "cool application";
var myPath = mApplication.getFolder() + myName;
var system_str = System.capabilities.os.toLowerCase();
if (system_str.indexOf("win")>=0) {
	myPath += myPath + ".exe";
} else if (system_str.indexOf("mac")>=0) {
	myPath += myPath + ".app";
} 

mFile.createShortcut(myPath,"",programsPath+"/ScreenTime/File.lnk","File","",0);