문제

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