Actionscript, getting stage.stageWidth after an orientation event

瘦欲@ 提交于 2019-12-11 14:59:53

问题


I am detecting an orientation change using

flash.events.StageOrientationEvent.ORIENTATION_CHANGING

Each time orientation occurs two events occur,

event.beforeOrientation
event.afterOrientation

However, after event.afterOrientation the stage.stageWidth property remains the same.

Is it possible to detect a orientation complete event, so I can then get the new stage width property.

I am hoping such an event exists as otherwise I think I must detect the orientation state and work out if the width and height need to be switched. But I do not like this solution because stage.stageWidth does get updated shortly after event.afterOrientation occurs, so I would need to track this.

来源:https://stackoverflow.com/questions/44408103/actionscript-getting-stage-stagewidth-after-an-orientation-event

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!