Вопрос

I upgraded my project from 4.5 to 4.6.

            stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, onOrientationChangeHandler);

        protected function onOrientationChangeHandler(event:StageOrientationEvent):void

I am using orientation change events. on orintation change event I get the the stage.stageWidth and stage.stageHeight to make some change on application.

On sdk4.5 it give the correct width and height but when I upgraded on 4.6 it gives the last save values. for e.g if I move device from portrait to landscape it should give the new landscape width height but it gives the old portrait width height which makes problem on application...

Does anyone faces this issue.??

Это было полезно?

Решение

I resolved the problem by using stage.addEventListener(Event.RESIZE, onStageResize);

Другие советы

You can try with systemManager Class. In AIR Mobile applications to get height and width of stage. Recommended way is you need to use systemManager.screen.width and systemManager.screen.height instead of stage.stageHeight and stage.stageWidth.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top