Skip to main content
Inspiring
January 26, 2012
Question

iOS Startup screen - strange problem

  • January 26, 2012
  • 5 replies
  • 2692 views

I am building an iPad application that is to run in landscape mode.

When I launch my app .. the startup screen displays properly...  then it quickly squeezes and displays rotated for portrait .. then quickly goes back to landscape.

Any idea why this would be happening ?

Everything was fine when running AIR 2.7   ..   I'm now using AIR 3 and seeing this problem.

This topic has been closed for replies.

5 replies

Participating Frequently
March 26, 2012

Looks like the issue has been logged in the AIR bugbase.  Go vote for it.

https://bugbase.adobe.com/index.cfm?event=bug&id=3121219

Colin Holgate
Inspiring
March 26, 2012

Is there a need to vote for it, if it's already been fixed?

Participating Frequently
March 26, 2012

Unfortunately, I don't think the issue has been completely fixed.  AIR 3.2 RC1 had a very similar issue with Default-Landscape.png when I tested it, so I added my comments and screenshots to that bug report.  It didn't rotate, however it did squeeze.  I wasn't for sure if I should open a separate bug since it is slightly different, but still very much related.

Participant
March 22, 2012

I have AIR 2.3 and it still does the same as in spinlight post... any ideas anyone???? tried all sorts of options!

Inspiring
March 22, 2012

I fought with this issue a long time ago and I did the following which fixed the problem permanently for me.

This was to get my app to support landscape only orientation (supports both orientations).

In my -app.xml file I've specified.

        <autoOrients>true</autoOrients>

        <aspectRatio>landscape</aspectRatio>

For launch images I had to include all of the following:

Default-Landscape.png

Default-LandscapeLeft.png

Default-LandscapeRight.png

Default-Portrait.png

Default-PortraitUpsideDown.png

Default.png

Default@2x.png

Its a little tricky to figure out what orientation each of the above images needs to be in, but once you've done it once you never need to figure it out again. There was a great post by someone in these forums a few months ago that displayed all the orientations using images that was really helpful, but I can't seem to find it anymore.

In my app start up code I also specify:

stage.align = StageAlign.TOP_LEFT;

stage.scaleMode = StageScaleMode.NO_SCALE;

var startOrientation:String = stage.orientation;

if (startOrientation == StageOrientation.DEFAULT )

{

                                                               stage.setOrientation(StageOrientation.ROTATED_RIGHT);

}

if (startOrientation == StageOrientation.UPSIDE_DOWN)

{

                                                               stage.setOrientation(StageOrientation.ROTATED_LEFT);

}

Hope that helps.

Participating Frequently
March 6, 2012

It's gone in 3.2...
I had the same thing, i just have the Default-landscape.png and that works.

Participating Frequently
March 6, 2012

You could contain your entire app inside a parent Sprite, and then rotate the Sprite 90 degrees to get landscape mode.

Known Participant
March 5, 2012

I'm fighting the same issue. This was fixed for a brief time and now it's back...at least for me. I can either get it to squish the landscape photo for a moment or do the rotation animation after it loads, which also looks bad. All our apps are landscape and we're always fighting with Flash to build an app that launches cleanly. Have you had any luck since your post?

March 6, 2012

I am guessing you are using the Landscape image for your start up Default-LandscapeRight.png or one of those, try using the Portrait image but make your art landscape, flip it 90 degress. Seems like the iPad looks for the portrait image first and if it cant find it it goes landscape but there is a weird lag, or include both, the Default-LandscapeRight.png and the Portrait but make them look the same.

Known Participant
March 6, 2012

I've just tested that and still getting odd behavior. In the landscape positions it grabs Default-LandscapeRight.png and displays it properly, then scales it for a second in a portrait ratio. In Portrait or P-Upsidedown position, it still grabs Default-LandscapeRight.png and displays it correctly, then scaled. The odd one is when help portrait left, it displays no default image. Just black. Maybe if I just use Default-Lanscape.png?

This time I'm only using these two default pics:

Default-LandscapeRight.png

Default-Portrait.png

XML:

<initialWindow>

        <content>AppName.swf</content>

        <systemChrome>standard</systemChrome>

        <transparent>false</transparent>

        <visible>true</visible>

        <fullScreen>true</fullScreen>

        <renderMode>cpu</renderMode>

        <autoOrients>true</autoOrients>

        <aspectRatio>landscape</aspectRatio>

    </initialWindow>

I'll try a few more combinations...

I'm pretty convinced Air 3.1 can't properly handle: <aspectRatio>landscape</aspectRatio>

EDIT:

My best result so far is using this combination:

Aspect Ration: Auto

Full screen: Checked True

Auto orientation: Checked True

Rendering: CPU

Device: iPAD

Resolution: Standard

Included Defaults:

Default-Landscape.png

Default-Portrait.png

And my XML file:

<initialWindow>

        <content>AppName.swf</content>

        <systemChrome>standard</systemChrome>

        <transparent>false</transparent>

        <visible>true</visible>

        <fullScreen>true</fullScreen>

        <renderMode>cpu</renderMode>

        <autoOrients>true</autoOrients>

    </initialWindow>

Also in my first frame I have this:

stage.scaleMode = StageScaleMode.NO_SCALE;

stage.align = StageAlign.TOP_LEFT;

import flash.display.StageOrientation;

stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, orientationChangeListener);

var startOrientation:String = stage.orientation;

if (startOrientation == "default" || startOrientation == "upsideDown") {

          stage.setOrientation(StageOrientation.ROTATED_RIGHT);

} else {

          stage.setOrientation(startOrientation);

}

function orientationChangeListener(e:StageOrientationEvent) {

          if (e.afterOrientation == "default" || e.afterOrientation == "upsideDown") {

                    e.preventDefault();

          }

}

I can't get rid of the rotation animation though. I'd prefer it just smoothly start running in the portrail right mode.