开发者

as3 | Flash | How Can I make fixed width-height when on full screen

开发者 https://www.devze.com 2023-03-13 01:43 出处:网络
After I export the .swf file in a certain size (1024*768) and then resize it manually (dragging the开发者_开发知识库 mouse to enlarge the screen) - everything stays in the same width and height.

After I export the .swf file in a certain size (1024*768) and then resize it manually (dragging the开发者_开发知识库 mouse to enlarge the screen) - everything stays in the same width and height.

After I export the .exe/.app file in a specific size (1024*768) and then resize it manually - everything scales (and I don't want that).

  1. How can I define in the as3 settings to leave the width/height size static and not dynamic.

  2. How can I tell the .exe file to get the full width and height of the current display?

I ask that because I want to have a full-size flash file that in the center there is the static sized stage.


To prevent scale use:

stage.scaleMode = StageScaleMode.NO_SCALE;

To enter fullscreen use:

stage.displayState = StageDisplayState.FULL_SCREEN;

Have a look at the docs


Take a look at the scaleMode property of stage. In your case it seems you would want to set it to StageScaleMode.NO_SCALE. The stageAlign property might be of interest too.

Read more in the livedocs.

0

精彩评论

暂无评论...
验证码 换一张
取 消