| Previous | Next | |
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;
mSystem.setScreenResolutionTo800x600() : VoidNothing.
Method; Sets the primary monitor's resolution to 800 pixels wide by 600 pixels high. The resolution can be returned to the user's original resolution using mSystem.resetScreenResolution().
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();
}mSystem.resetScreenResolution(), mWindow.center(), mWindow.setPosition()
| Questions or Feedback? | Previous | Next |