STF.registerCallBack()

Availability

Flash MX 2004 or 8 swf w/ ScreenTimeScreenSaver component + ScreenTime 3.0 / 3.0

Usage

STF.registerCallBack(commandName:String, function:String, target:String) : Void

Parameters

commandName - The name of the mWindow command.

function - The function to be will be called upon the completion of the Mac mProjector command.

target - Object to be used as this in the callback function.

Returns

Nothing.

Description

Method; This method is used to register a callback function for STF methods having a return value. STF functions which return values run asynchronously, meaning they run and complete sometime after all ActionScript in the frame has executed. The registered callback function receives the return value as it's argument. The callback's argument must match the return value type of the associated mProjector command.

Example

The following sample retrieves a unique identifier for the current user.

var userID:String;

// callback function
onGetUserGUIDReturn = function(returnValue:String) { 
	userID = returnValue;
}

// register callback function
STF.registerCallBack("getUserGUID", onGetUserGUIDReturn, this); 

STF.getUserGUID();

See Also

STF.unregisterCallBack()