Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-09-2009, 10:04 PM
Junior Member
 
Join Date: Oct 2009
Posts: 2
Post Toggling Between Full-Screen & Windowed Uncenters Content

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;

}
I'm duplicating the appearance and size calls, since as previous posts have mentioned doing them once sometimes leads to them being ignored.

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!
Reply With Quote
  #2 (permalink)  
Old 10-23-2009, 07:34 PM
Junior Member
 
Join Date: Oct 2009
Posts: 2
Default

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.
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:51 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.