Skip to main content
plungeint
Participating Frequently
November 11, 2011
Answered

How to deal with multiple Android ressolutions with Flash->AIR games

  • November 11, 2011
  • 1 reply
  • 586 views

Hi,

I have some Flash games that want to make run on different Android devices. How do we do so? I've seen that in one of my games, while I check "full screen" when exporting, the game area is not taking all the available space on the screen. I guess that's because the aspect ratio.

I've seen this nice tutorial to solve that problem on Flex apps/games: http://gregsramblings.com/2010/05/06/scaling-an-adobe-air-application-to-fit-multiple-resolutions-and-netbooks/

Is there any similar solution for flash based games?

Thanks!

This topic has been closed for replies.
Correct answer Colin Holgate

That article looks like it's geared towards desktop applications, and it makes sure the window never gets bigger than the original size.

You will read, any minute now, that a lot of people set the stage to not scale, and then use layout code to position the interface to look right, and will even take note of the DPI of the device to make sure that buttons are the right physical size. That's fine for typical utility apps, but if you have a detailed illustrated background, or any sort of fixed bitmap art, it may not be the right way to solve the problem.

The way I solve the problem is to not do any scaling at all, I leave that up to Flash, but I have spare content off the edges of the stage, that will be revealed on wider or taller screens.

The first time I used that approach I made the Flash stage be 480x320, and had extra content above and below the stage, to a total height of 360. That single file would exactly fit the iPhone screen and also the different aspect ratio iPad. On the iPad you would see the extra content.

That works fine if you layout for the widest device, and a have extra content for the less wide devices, but there is only one device less wide than the iPhone, the iPad. So now I have switched the technique to horizontal.

My stage is now 1024x768, and there is a lot of extra content off the left and right edges. I have enough there that it will still fill the screen on the widest device, which is the new Samsung Galaxy Nexus.

1 reply

Colin Holgate
Colin HolgateCorrect answer
Inspiring
November 11, 2011

That article looks like it's geared towards desktop applications, and it makes sure the window never gets bigger than the original size.

You will read, any minute now, that a lot of people set the stage to not scale, and then use layout code to position the interface to look right, and will even take note of the DPI of the device to make sure that buttons are the right physical size. That's fine for typical utility apps, but if you have a detailed illustrated background, or any sort of fixed bitmap art, it may not be the right way to solve the problem.

The way I solve the problem is to not do any scaling at all, I leave that up to Flash, but I have spare content off the edges of the stage, that will be revealed on wider or taller screens.

The first time I used that approach I made the Flash stage be 480x320, and had extra content above and below the stage, to a total height of 360. That single file would exactly fit the iPhone screen and also the different aspect ratio iPad. On the iPad you would see the extra content.

That works fine if you layout for the widest device, and a have extra content for the less wide devices, but there is only one device less wide than the iPhone, the iPad. So now I have switched the technique to horizontal.

My stage is now 1024x768, and there is a lot of extra content off the left and right edges. I have enough there that it will still fill the screen on the widest device, which is the new Samsung Galaxy Nexus.