Skip to main content
Participating Frequently
October 25, 2013
Question

Screen Orientation

  • October 25, 2013
  • 1 reply
  • 422 views

Hello all,

I am developing mobile app for ios using flash builder . How do i change the content of the app say label when the device orientaion is changed

This topic has been closed for replies.

1 reply

Participating Frequently
October 25, 2013

You have to listen for the specific event and call a function that does something...

                              stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, onChangeScreenOrientation);

private function onChangeScreenOrientation(e:StageOrientationEvent):void {

                              switch (e.afterOrientation) {

 

                                        case StageOrientation.DEFAULT :

      // something to do here;

                                        break;

 

                                        case StageOrientation.ROTATED_RIGHT : 

     // something to do here;

                                        break;

 

                                        case StageOrientation.UPSIDE_DOWN : 

     // something to do here;

                                        break;

 

                                        case StageOrientation.ROTATED_LEFT :

      // something to do here;

                                        break;

                              }