Over the years I have found that MAC/IOS devices tend to behave erratic when fullscreen is triggered.
There are two workarounds I know of:
Using fullScreenSourceRect as described here
and giving the device time after launch to go into fullscreen, meaning: include a timer in your program that will trigger the goFullscreen function with a delay of at least 500 milliseconds.
Thanks for your reply. I'll look into the timer workaround, as you mentioned. But, my code doesn't even use the StageDisplayState.FULL_SCREEN code that was referenced in the link, above.
I'll look more into StageDisplayState.FULL_SCREEN, as I'm not even aware of what that does.
I was under the impression that the StageScaleMode.NO_SCALE code that I used was all that I needed, per guidance from Adobe's webpages on iOS development.
Overall, I'm baffled as to why, when using StageScaleMode.NO_SCALE code with my 1024x768 graphics and stage, my app DOES scale to fit the whole 2048x1536 screen of my iPad3 Retina. It just doesn't fill the whole screen of Apple's iPad3 Retina. Frustrating!!!
OK, maybe this is NOT an Apple-testing problem after all...
I think I've isolated the problem: since updating to AIR 3.7 (which I had to do in order to allow the Defaultemail@example.com image to be recognized properly), the stage.orientation is not working! Essentially, my app is failing because stage.orientation keeps resulting in null. This did NOT happen before updating to AIR 3.7 in Flash.
My workflow went like this... I published to AIR 3.4, but due to some new requirements from Apple, the Defaultfirstname.lastname@example.org image would not be recognized. But, my app worked properly. Other forum people said that one must update to AIR 3.7. So, I did -- and, voila, my app stopped working (for both me AND Apple). I traced it to stage.orientation always resulting in null.
Would/could any Adobe people please reply regarding this problem with AIR 3.7? Or, is there something I'm doing wrong? Thank you for any help.
AS3.0 has introduced a new API *Stage.contentsScaleFactor* that specifies the effective pixel scaling factor of the stage. This value is usually 1 on standard screens and 2 on HiDPI (a.k.a Retina) screens. When the stage is rendered on HiDPI screens the pixel resolution is doubled; even if the stage scaling mode is set to StageScaleMode.NO_SCALE. Stage.stageWidth and Stage.stageHeight continue to be reported in classic pixel units.
So, probably use Stage.contentsScalefactor API, while developing applications for a HiDPI screens:
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
Constants.stageWidth = stage.fullScreenWidth/stage.contentsScaleFactor;
Constants.stageHeight = stage.fullScreenHeight/stage.contentsScaleFactor;
Let us know if this solves your issue.
Adobe Flash Professional Team
I've just compiled my new 2048 x 1536 px app, which I'm about to upload to App Store for approval. After reading this thread, I'm afraid that my app could be rejected.
Could you please make it clear, so I make necessary changes (in any).
stage.align = StageAlign.TOP_LEFT
stage.scaleMode = StageScaleMode.SHOW_ALL //this is because if iPad is not 'retina display', app will automatically adjust its pixels.
Am I doing right or it would be rejected? Furthermore, is it recommended or no (and finally if it is not recommended, than what it should be)?
My app stage is 1024x768, not 2048x1536 like your app. When I tried using stage.scaleMode = StageScaleMode.SHOW_ALL, the results didn't fit the screen, either.
I decided not to use a stage size of 2048x1536 because it's just so darn huge to develop with... I'm trying to get away with 1024x768 for my stage size, and I'm currently using NO_SCALE.
I don't know if your 2048x1536 stage size will work properly for Apple, yet cause problems for the older 1024x768 iPads.
I see that someone at Adobe, total_flash1, just replied and told me to use stage.contentsScaleFactor. I'll try that and see if it works for me.
I've already checked my application on iPad 2 and iPad 3. On both the ipads, it works good. I've read somewhere that SHOW_ALL property works well. My application's UI just does not depend on the stage, you can I've designed this application exclusively for iPads with retina display only, but since SHOW_ALL propery works on non-retina iPads as well, I thought let it be available for iPad 2, iPad 1 and iPad Mini as well.
Let me give it a try, I hope I won't face any problem.
total_flash1, I tried using stage.contentsScaleFactor, and it results in the value 1 even on my iPad3 Retina (not 2 as you indicated) . I could not get your stage.contentsScaleFactor to effect any change in my application. The results were that my 1024x768 stage application still occupied only half of the screen of my iPad3 Retina.
I could not find any Adobe documentation on stage.contentsScaleFactor, either.
I have solved the problem temporarily with a weak workaround to the whole problem by using:
mc.scaleX = mc.scaleY = flash.system.Capabilities.screenResolutionX/768;
(this scales my movieclip, mc, to either 1 for iPad1/iPad2 or 2 for iPad3 Retina)
Essentially, things were working well until AIR 3.7 SDK. But, with AIR 3.7 SDK:
1) stage.orientation keeps resulting in null (I solved this by NOT putting stage.orientation in my first frame... I put it in the 2nd frame, and now it works).
2) stage.orientation has some conflicts with stageWebView. I'm using stageWebView to play an .mp4 video in full-screen. Let's say you're viewing the app in landscape, and you're watching the .mp4 video in a stageWebView window. When you stretch-swipe the stageWebView window, the video properly goes to full-screen. But, if you change the orientation of the iPad while the video is now in full-screen, the Flash application running underneath does not get its stage.orientation reset to the new orientation (portrait). Thus, when you close the video, the app is visible again but the layout (landscape) does not match the current orientation of the device (portrait). Again, stage.orientation used to work when the app was in the background, but not any more.
total_flash1, can you please indicate what's going on with #2, above? Thank you for any help. I really appreciate it, as I'm at my wit's end! : )
I suggest you this:
If you stage is 1024x768, and Resolution is: "High", exclude Retina iPads from High Resolution. Use this in your application descriptor:
To know more about it, refer this:
I must sort out your problem.
I'll post this to Adobe AIR forum as soon as I can... I'm presently out of the office.
1) When I use StageScaleMode.EXACT_FIT, I get results similar to my screen shot. Landscape displays properly, but Portrait causes my portrait layout to be extended vertically off the screen (past the bottom). For me, neither EXACT_FIT nor SHOW_ALL worked.
2) Without opening (i.e., stretch-swiping) the video, but rather allowing it to play in its regular StageWebView window, changing device orientation from portrait to landscape (and vise-versa) DOES change the stage orientation correctly. I have no trouble. Only when the video is stretch-swiped to full-screen does the app (running in the background) fail to process stage.orientation when device orientation is changed.