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

Building apps for iPhone and Android

Guest
May 06, 2013 May 06, 2013

Hi guys

I'm making my way through:

Professional Flash Mobile Development: Creating Android and iPhone Applications - by Richard Wagner

I'm planning on making a single app for both iPhone and Android in Flash Pro

I understand that there is a different set up for each platform, but I was wondering if anyone here experienced in app making using Flash has any tips for developing for both platforms with minimal change to code - ie not having to change your main base code too much, and also, what you found you did need to change between platforms?

I'm especially interested in catering for different size screens. Ideally I'd like the app to stretch to fit whatever screen eg iPhone/iPad/large Android etc, but maintain it's aspect ratio. But I noticed in the demo apps in the book, you stipulate the viewport eg;

private const VIEWPORT_WIDTH:int = 320;

private const VIEWPORT_HEIGHT:int = 480;

So if you're stipulating the viewport size, how do you release one app to the apple marketplace that will suit both iPhones and iPads?

Thanks for your time and sharing your experience.

TOPICS
ActionScript
1.0K
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

correct answers 1 Correct answer

Explorer , May 06, 2013 May 06, 2013

I have experianced the situation, I have searched a lot to find the solution.

just use stage.scaleMode = StageScaleMode.ShowAll.

so swf stage will be in center and scaled proportionally whatever the screen size, and use extra area beyond your swf width  and only for width this is called safe area that will be used in bigger screens.

we have been doing it and no issues at all for any kind of device both Iphone and Android.

Translate
Community Expert ,
May 06, 2013 May 06, 2013

you should use actionscript to detect the screen size or you'll need to create two different apps.

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
Explorer ,
May 06, 2013 May 06, 2013

I have experianced the situation, I have searched a lot to find the solution.

just use stage.scaleMode = StageScaleMode.ShowAll.

so swf stage will be in center and scaled proportionally whatever the screen size, and use extra area beyond your swf width  and only for width this is called safe area that will be used in bigger screens.

we have been doing it and no issues at all for any kind of device both Iphone and Android.

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
Guest
May 06, 2013 May 06, 2013

Thank you both.

stage.scaleMode = StageScaleMode.ShowAll sounds like what I am after - I will have a play with it.

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
Community Expert ,
May 07, 2013 May 07, 2013

if you use showall, you will have borders displayed on two sides of the screen in, at least, one of your apps.

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
Guest
May 08, 2013 May 08, 2013

I can live with the borders on the sides of the iPad and tablets - I just want the graphics to stretch, maintain their aspect ratio,  and still look nice.

ShowAll seems to be working ok - but I'm yet to test it against creating two sets of images.

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
Community Expert ,
May 08, 2013 May 08, 2013
LATEST

as long as you're not picky about those borders, you should be ok.

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