Hi all,
I've never had this problem before, and been developing AIR apps for mobile for some time (with this exact same code). It may be due to AIR4.0 BETA, which I am using for this project.
On iPhone 5, the following code will tell me that the stage size is 960 x 1524:
// Scaling and positioning
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.quality = StageQuality.HIGH; // Screen size
screenWidth = stage.stageWidth;
screenHeight = stage.stageHeight;
However, after a rotation event, the stageWidth/stageHeight is reported as 640 x 1136, which is what I've always had in the past. This is also the value I would expect from the code above (which is run directly on start-up of the app).
I can't ask my users to rotate their phone every time they start the app, so does anyone know a way to get the correct stageWidth and stageHeight from the start?
Cheers,
Peter