如何将移动AIR应用程序保持在横向模式下?

时间:2012-02-12 10:20:10

标签: ios flex mobile air adobe

我似乎无法找到任何方法强制它一直进入横向模式。当我转到MyApp-app.xml并将<aspectRatio></aspectRatio>标签编辑为横向时,只会对主视图进行美化。如果我导航到第二个视图,则会返回人像。有什么帮助吗?

2 个答案:

答案 0 :(得分:1)

您可以在文档的属性上进行设置。转到文件&gt;发布设置&gt;单击配置播放器(“Air for Android”,“Air for iOS”,“Flash Player 11”等)。 现在,标记“Auto Orietation”。

像这样:

enter image description here

现在,保存并测试。

答案 1 :(得分:0)

设备可能是其中的一个重要因素。您遇到问题的设备是什么设备?

那就是说,除了将aspectRatio设置为landscape之外,我还会尝试将autoOrients设置为false:

    <!-- The initial aspect ratio of the app when launched (either "portrait" or "landscape"). Optional. Mobile only. Default is the natural orientation of the device -->
    <aspectRatio>landscape</aspectRatio>

    <!-- Whether the app will begin auto-orienting on launch. Optional. Mobile only. Default false -->
    <autoOrients>false</autoOrients>