Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

App scaling to screensizes on Android but not on iOS

Participant ,
Feb 20, 2014 Feb 20, 2014

Hi,

I am creating an app with AS3 for Android and also for iOS.

Due to the different smartphone sizes it is necessary to scale the apps to the appropriate screens. Developing for Android that seems to work OK.

The code I use for this on Android however does not work on iOS.

On iOS it seems that I can only scale the app to the width of the screen. The height of the app then scales proportionally to the width of the app. The rest of the length of the app is now outside the screen boundaries.

How can I scale to the app also to the different iOS screens?

Any help is greatly appreciated.

Code:

-------------

stop();

import flash.display.Stage;

import flash.display.StageAlign;

import flash.display.StageScaleMode;

 

//Works on Android not on iOS:

stage.scaleMode = StageScaleMode.NO_SCALE;

stage.align = StageAlign.TOP_LEFT;

//Works on iOS however part height of app may be outside screen boundaries

stage.scaleMode = StageScaleMode.NO_BORDER;

//rest of code like this:

header_mc.x = stage.stageWidth / 2;

header_mc.y = 0;

header_mc.width = stage.stageWidth;

header_mc.height = stage.stageWidth / 4;

//etc.....

TOPICS
ActionScript
318
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation