• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Different Orientations for iPhone/iPad

Community Beginner ,
Sep 19, 2013 Sep 19, 2013

Copy link to clipboard

Copied

We're working on a universal iOS app and want to be able to run in portrait mode for iPhone and landscape mode for iPad.


Right now we're setting the aspect ratio in code on the first frame, but this causes the screen to display a rotating animation as the application changes orientation, which looks bad. Is there a better way to do this?

TOPICS
Development

Views

638

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 20, 2013 Sep 20, 2013

Copy link to clipboard

Copied

Are you seen this while debugging? I request to check it once without debugging and see if the problem is still reproducible.

Regards,

Nimit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 20, 2013 Sep 20, 2013

Copy link to clipboard

Copied

LATEST

We're seeing this issue on the actual device (iPhone 4 running iOS 6) on all deployment types both with and without debugging. We're compiling with Flash Professonal CC to Air 3.9.1.1080. We have the aspect ratio set to landscape, full screen is on and auto orientation is off.

After some more experimentation, we are only able to get the app to load without the rotating animation under very specific conditions:

  • Must have exported a large asset (~100k) on the first frame, such as an image
  • Cannot have any objects on the stage at load time
  • Immediatly change the stage aspect ratio setting to portriat in the main class's construtor and turn back on auto orientation
  • Wait 10 frames before adding any objects to the stage

If any of those conditions are not met, the rotation animation returns. This appears to "fix" the problem on first load. If you kill the application and try to re-open it, the rotating animation will return sometimes.

This seems really buggy to me and must have something to do with Air's initialization code somehow. I don't like the 10 frame lag before displaying anything to the screen plus I really don't feel comfortable shipping anything relaying on this hack. Any ideas?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines