Highlighted

Stage.contentsScaleFactor always 1 on iPhone4s and iPad mini

New Here ,
Jun 25, 2015

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?

TOPICS
Performance issues

Views

260

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Stage.contentsScaleFactor always 1 on iPhone4s and iPad mini

New Here ,
Jun 25, 2015

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?

TOPICS
Performance issues

Views

261

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 25, 2015 0

Have something to add?

Join the conversation