AS3 - 使用完整浏览器窗口的全屏
即使在全屏模式下,我的 Flash 程序也没有使用完整的浏览器窗口。它使用完整的高度,但不使用完整的宽度。我最终得到了一大块空白。我有以下用于全屏模式的代码:
function fullscreenOnClick(e:MouseEvent):void
{
stage.align = StageAlign.TOP_LEFT
stage.displayState = StageDisplayState.FULL_SCREEN;
}
我还有一些设置背景颜色的代码:
//set the background
graphics.beginFill(0x777777);
graphics.drawRect( 0, 0, stage.stageWidth, stage.stageHeight);
graphics.endFill();
所以问题是舞台的宽度不是浏览器的完整尺寸。我使用的是 Flash Builder 4.6 有没有办法设置舞台参数以实现真正的全屏?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一定是由于 缩放造成的模式。尝试将舞台的scaleMode更改为StageScaleMode.NO_BORDER(如果StageScaleMode.NO_BORDER不是您想要的,则尝试其他缩放模式。)
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.)