STF.getMonitorNumber()

Availability

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

Usage

STF.getMonitorNumber() : Number

Parameters

None.

Returns

A number.; 1 = primary monitor; 2 = secondary monitor.

Description

Method; Returns the monitor number on which the SWF is being played. Supports one or two monitor configurations.

Example

The following sample determines whether the SWF has been loaded on the primary or secondary monitor and loads the approriate content.

function onGetMonitorNumberReturn(monitorNumber:Number) {
	if (monitorNumber == 2) {
	    saver_mc.loadMovie("seconday_monitor.swf");
	} else {
	    saver_mc.loadMovie("primary_monitor.swf");
	} 
}
STF.registerCallBack("getMonitorNumber", onGetMonitorNumberReturn, this);
STF.getMonitorNumber();

See Also

STF.getPlayMode()