05-27-2011 05:00 AM
Hi to all...
i am creating an app in playbook , in which i need to support landscape and portrait both view.
i have created my all views in mxml.
by doing some task i am able to access an event which tells that screen is getting change
but now i am facing problem to get the width and height of the mxml view.
because if oreintation is 90 degree my code works perfectly. but if u will make it as 180 it will be messed.
please tell me how can i get the display width & height by which i will be able to understand which view should be load.
my code ..
protected function view1_initializeHandler(event:FlexEvent):void
protected function onOrientationChange(eventtageOrientationEvent):void
Solved! Go to Solution.
05-27-2011 05:26 AM
In your function onOrientationChange you could just listen for stage.stageWidth and stage.stageHeight to know the width and height currently. A better solution would be to check the event.afterOrientation value.