1

我将我的项目从 4.5 升级到 4.6。

            stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, onOrientationChangeHandler);

        protected function onOrientationChangeHandler(event:StageOrientationEvent):void

我正在使用方向更改事件。在 orintation change 事件中,我得到 stage.stageWidth 和 stage.stageHeight 以对应用程序进行一些更改。

在 sdk4.5 上,它给出了正确的宽度和高度,但是当我在 4.6 上升级时,它给出了最后的保存值。例如,如果我将设备从纵向移动到横向,它应该给出新的横向宽度高度,但它给出了旧的纵向宽度高度,这会在应用程序上产生问题......

有人遇到这个问题吗??

4

2 回答 2

0

你可以试试systemManagerClass。在 AIR Mobile 应用程序中获取舞台的高度和宽度。推荐的方法是你需要使用systemManager.screen.widthandsystemManager.screen.height而不是stage.stageHeightand stage.stageWidth

于 2013-09-13T11:21:28.003 回答
0

我通过使用解决了这个问题 stage.addEventListener(Event.RESIZE, onStageResize);

于 2013-09-03T10:39:55.387 回答