|
|||
|
I'm testing my application on a few machines and have noticed with certain video card configurations, switching between full screen and windowed mode leaves the swf content either offcentered or improperly clipped.
The AS code I'm using to switch between full screen and windowed mode is below: Code:
var appearance : Appearance = new Appearance();
var directx : DirectX = new DirectX();
var sizeAndPos : SizeAndPos = new SizeAndPos();
// If we are turning full screen on
if( isFullScreen )
{
directx.setDisplayMode( fullScreenWidth , fullScreenHeight , fullScreenDepth );
appearance.borderStyle = Appearance.BSNONE;
appearance.borderStyle = Appearance.BSNONE;
appearance.borderIcons = 0;
appearance.borderIcons = 0;
sizeAndPos.windowSize = SizeAndPos.SSFULLSCREEN;
sizeAndPos.windowSize = SizeAndPos.SSFULLSCREEN;
appearance.scaleMode = Appearance.SMNOBORDER;
appearance.scaleMode = Appearance.SMNOBORDER;
}
// Else if we are turning it off
else
{
directx.restore();
appearance.borderStyle = Appearance.BSSINGLE;
appearance.borderStyle = Appearance.BSSINGLE;
appearance.borderIcons = Appearance.BISYSTEMMENU;
appearance.borderIcons = Appearance.BISYSTEMMENU;
sizeAndPos.windowSize = SizeAndPos.SSDEFAULT;
sizeAndPos.windowSize = SizeAndPos.SSDEFAULT;
appearance.scaleMode = Appearance.SMNORMAL;
appearance.scaleMode = Appearance.SMNORMAL;
}
On a desktop using a NVIDIA Quadro FX 540 (driver 6.14.0011.8630), switching from windowed to full screen leaves the SWF content shifted about 50 pixels down the screen, leaving the stage background visible at the top and the bottom of the SWF clipped off. On a laptop using a ATI Mobility FireGL V5725 (driver 6.14.0010.6822), switching from full screen to windowed mode results in a window that takes up the entire desktop with the SWF content centered and the remainder of the window filled with the stage background color. I haven't been able to duplicate this on two other machines, making me think there's something about the ordering of the calls or something specific to these video cards that's causing the issue. Any help resolving this would be greatly appreciated. Thanks! |
|
|||
|
Think I might have a resolution to this issue. I've modified my code to invoke the window size calls on the next frame. This appears to fix the issue. I'm thinking the reason why my original code doesn't work is because the changes to the window appearance don't take effect until the next frame. So when I'm setting the size of the window its using the current window metrics of the existing window and not the metrics of the new style I've requested.
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|