【问题标题】:Flash Pro cc why is the stage width and height on my phone, set as the one inside Flash pro?Flash Pro cc 为什么我手机上的舞台宽度和高度设置为Flash pro里面的?
【发布时间】:2014-07-29 00:07:57
【问题描述】:

我在为正在开发的应用程序设置舞台高度和宽度时遇到问题。

我需要设置设备屏幕的高度和宽度。所以我做stage.fullScreenHeight 和stage.fullScreenWidth。

但我刚刚意识到它设置的 fullScreenHeight 和宽度是 Flash pro cc 属性下的舞台大小(舞台大小)。

而且我无法根据手机设置舞台宽度和高度。即使我做 Capabilities.screenResolutionX;或 stage.stageHeight。所有这些都设置为图像的大小或 flash pro 中的舞台,但没有一个是根据设备设置的。

编辑:

E.g. var button = Button = new Button(); 
button.width = stage.stageWidth;
button.height = Button.width/stage.stageWidth * Button.height;

【问题讨论】:

    标签: actionscript-3 flash actionscript flash-cs6


    【解决方案1】:

    试试 stage.scaleMode = StageScaleMode.NO_SCALE

    或取消选中 Air 设置中的“全屏”复选框

    【讨论】:

    • 是否可以将(例如按钮)设置为无刻度?例如。 button.scaleMode = StageScaleMode.No_SCALE?
    • 据我所知你不能。但也许 .scaleX 和 .scaleY 属性会帮助你。例如。 button.scaleX = 1.5
    猜你喜欢
    • 2011-10-16
    • 2013-04-18
    • 1970-01-01
    • 2015-08-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-30
    • 1970-01-01
    相关资源
    最近更新 更多