Skip to main content
Known Participant
August 9, 2011
Question

A few iOS plist questions...

  • August 9, 2011
  • 2 replies
  • 851 views

How can I get my app to auto rotate but only in landscape mode?

How can I hide the statud bar of the iPhone (the bar with time, network, wifi etc.)

Thanks

This topic has been closed for replies.

2 replies

August 9, 2011

To hide the status bar simply select full screen under iOS publish settings.

Participating Frequently
August 10, 2011

Hi,

You should set aspectRatio to landscape, and autoOrients to true in application xml. In your code, you can prevent the default behavior for OrientationChanging event if afterOrientation is "default" or "upsideDown". Try:

stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, orientationChangeListener);

function orientationChangeListener(e:StageOrientationEvent)
{
  
if (e.afterOrientation == StageOrientation.DEFAULT || e.afterOrientation ==  StageOrientation.UPSIDE_DOWN)
  
{
     e
.preventDefault();
  
}
}

Thanks,
Sanika


Inspiring
August 10, 2011

However, there is still a bug and therefore it will (on iPhone and iPad) rotate to the portrait view and then automatically jump back to landscape view when changing the orientation, just for a second or so, but enough so it doesn't look like a native app.

Regards,

Josh

Known Participant
August 9, 2011

well not sure about the auto rotate, im sure if you go to the ios settings then untick auto rotate, then change the stage from 320x480 to 490x 320 then it will only be landscape.

And for the second one it os not possible in flash, only xcode on mac.