问题
My flash program isn't using the full browser window, even while in full-screen mode. It uses the full height but not the full width. I end up with a large chunk of white space. I have the following code for full-screen mode:
function fullscreenOnClick(e:MouseEvent):void
{
stage.align = StageAlign.TOP_LEFT
stage.displayState = StageDisplayState.FULL_SCREEN;
}
I also have some code to set the background color:
//set the background
graphics.beginFill(0x777777);
graphics.drawRect( 0, 0, stage.stageWidth, stage.stageHeight);
graphics.endFill();
So the problem is that the stage's width isn't the full size of the browser. I'm using Flash Builder 4.6 is there a way to set the stage's parameters to allow for true full-screen?
回答1:
It must be because of the scaling mode. Try changing the stage's scaleMode to StageScaleMode.NO_BORDER, (or experiment with the other scale modes if StageScaleMode.NO_BORDER is not what you are looking for.)
来源:https://stackoverflow.com/questions/9318179/as3-fullscreen-that-uses-full-browser-window