Copy link to clipboard
Copied
Hello, I have an issue about Stage.contentsScaleFactor property.
My application is just a template AIR Mobile AS3 project from FlashDevelop: application.xml file, and a Main class. In the Main class, I create a text field with stage.contentsScaleFactor value as a text:
var textField:TextField = new TextField();
textField.appendText("Size: " + stage.stageWidth + " x " + stage.stageHeight + "\n");
textField.appendText("Scale: " + stage.contentsScaleFactor + "\n");
addChild(textField);
On my iPhone with retina support, i get "Size: 960 x 640 Scale: 1" for <requestedDisplayResolution>high</requestedDisplayResolution>, and "Size: 480 x 320 Scale: 1" for <requestedDisplayResolution>standard</requestedDisplayResolution>.
Almost the same for iPad, "Size: 2048 x 1536 Scale: 1" for high, and "Size: 1024 x 768 Scale: 1" for standard.
I'm compiling with latest AIR SDK 18 (beta), -swf-version=29.
Same results for release AIR 18.
For AIR 14 -swf-version=25, I get some garbage values for "Size" (it looks like my swf width and height multiplied by what contentsScaleFactor should be), but still "1" for contentsScaleFactor.
Am I missing something important about "contentsScaleFactor" property? Or how can I determine that my application is running on hidpi display?