0
votes

I am using flash cs6. and AIR 14. I want to get iOS device resolution in AIR.

My code is:

var screenWidth:String = String(Capabilities.screenResolutionX);
var screenHeight:String = String(Capabilities.screenResolutionY);

By using this code I am getting desktop and android device resolutions correctly, but in case of iOS I am getting the wrong resolution.

Installed app on iPad 3 MODEL is MC705HN/A, the correct resolution is 2048-by-1536-pixel, but I am getting 1024/768.

2

2 Answers

1
votes

This solved my problem. Go into the App Descriptor XML file. Toward the bottom (generally one of the last items in the file), there should be this line.

standard If it is commented out or set to "standard", this would be your issue. Change it to say "high" and that will enable Retina support. "standard" scales the non-retina display (320x480 on iPhone, 1024x768 on iPad) up. "high" will give you the correct display resolution.

0
votes

You can also use stage.fullScreenWidth and stage.stageWidth. I think they work well in any device.