mSystem.resetScreenResolution()

Availability

Windows: Flash 8 or 9 AS2.0 SWF + mProjector 3.0; Windows NT Support: Flash 7 SWF + mProjector 2.0 build 'de';

Macintosh: Flash 8 or 9 AS2.0 SWF + mProjector 2.0.2;

Usage

mSystem.resetScreenResolution() : Void

Parameters

None.

Returns

Nothing.

Description

Method; Returns the primary monitor resolution back to the dimensions active before mSystem.setScreenResolutionTo800x600() was called.

Example

The following example uses two button scripts to change the screen resoution and window position. The resetResolution_btn.onPress script changes the user's primary monitor resolution to 800 by 600 then positions the window at 0,0. The reduceResolution_btn.onPress script resets the resolution to the user's original setting and centers the window at the new resolution.

Note: mWindow.center() is not guarenteed to work immediately after calling mSystem.resetScreenResolution(). Use setInterval to call mWindow.center() after the screen resolution change is complete.

var centerWindowProcessID;
Stage.scaleMode = "noScale";
reduceResolution_btn.onPress = function() {
	mSystem.setScreenResolutionTo800x600();
	mWindow.setPosition(0,0);
}
resetResolution_btn.onPress = function() {
	mSystem.resetScreenResolution();
	centerWindowProcessID = setInterval(centerWindow,500);
}
centerWindow = function() {
	clearInterval(centerWindowProcessID);
	mWindow.center();
}

See Also

mSystem.setScreenResolutionTo800x600(), mWindow.center(), mWindow.setPosition()

Code Examples

Change Screen Resolution