Skip to main content
Participant
January 6, 2012
Question

Problem with portrait to landscape

  • January 6, 2012
  • 1 reply
  • 547 views

Hi,

I have a home page in Portrait mode. When I turn the device to Landscape mode, I load few images.

In this case, what happens is, When I turn Iphone / Android device to Landscape, first I see the home page in Landscape view. Then the image comes.

I don't want to see my Home page in Landscape.

How to avoid this? Any help / tips would be appreciated.

This topic has been closed for replies.

1 reply

Colin Holgate
Inspiring
January 6, 2012

If you don't mind targeting Android 2.3, I think you can use the changing event instead of the changed event. That way you know the user has rotated the device before the stage itself has rotated. You can quick hide the landscape arrangement and set up the portrait one.

Participant
January 7, 2012

Hi,

  Thanks for your quick reply. Your answer will solve half of my problem.

I am targeting Android device also. Even if I leave this, still I have problem to completely solve this issue.

private function onOrientationChanging(soe:StageOrientationEvent):void

  {

      HomePage.Visible = False; ====> I don't know how to refer HomePage here

 

  }

As stage object and StageOrientationEvent works at application level, I need to know how to refer my HomePage object in the application level.

Can you help me further on this?