Be a Supporter!

Different screen sizes

  • 369 Views
  • 4 Replies
New Topic Respond to this Topic
alwayssim
alwayssim
  • Member since: Dec. 4, 2011
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Different screen sizes Jun. 10th, 2012 @ 09:15 AM Reply

I remember hearing (I think from Kirk) that one thing to watch out for when developing Android apps is that different phones have different screen sizes. So my question is, what do you need to do in flash to ensure this isn't an issue?

For instance, given that the default size for an "Air for Android" project is 480*800, if I want to make a movieclip go to the right hand side of the screen, can I put mc.x=480; or will I need to use mc.x=stage.width; to ensure it works on all phones?

Kirk-Cocaine
Kirk-Cocaine
  • Member since: Aug. 17, 2003
  • Offline.
Forum Stats
Moderator
Level 38
Programmer
Response to Different screen sizes Jun. 11th, 2012 @ 05:22 PM Reply

At 6/10/12 09:15 AM, alwayssim wrote: I remember hearing (I think from Kirk) that one thing to watch out for when developing Android apps is that different phones have different screen sizes. So my question is, what do you need to do in flash to ensure this isn't an issue?

For instance, given that the default size for an "Air for Android" project is 480*800, if I want to make a movieclip go to the right hand side of the screen, can I put mc.x=480; or will I need to use mc.x=stage.width; to ensure it works on all phones?

I has a similar problem with the iPhone 4S (960x640) and the iPhone 3GS (480x320). If memory serves, settings scale mode to no scale, and stage align to top left and using stage.nativeWindow I was able to position everything well enough. If you're using Flash Builder it should allow you to emulate a wide range of devices, so it should give you some idea of how things look.


The water in Majorca don't taste like what it oughta.

| AS3: Main | AS2: Main | Flash Tutorials |

BBS Signature
alwayssim
alwayssim
  • Member since: Dec. 4, 2011
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Different screen sizes Jun. 12th, 2012 @ 02:45 PM Reply

At 6/11/12 05:22 PM, Kirk-Cocaine wrote: I has a similar problem with the iPhone 4S (960x640) and the iPhone 3GS (480x320). If memory serves, settings scale mode to no scale, and stage align to top left and using stage.nativeWindow I was able to position everything well enough. If you're using Flash Builder it should allow you to emulate a wide range of devices, so it should give you some idea of how things look.

I'm not using Flash builder, I'm using Flash CS5.5. Would it be worth getting the flash builder trial just before I'm ready to publish in order to make sure everything's all in order? Or alternatively, would upgrading to CS6 give me any more features for creating apps?

If memory serves, settings scale mode to no scale, and stage align to top left and using stage.nativeWindow I was able to position everything well enough.

Are these options only available in flash builder? I can't seem to find them on CS5.5

Kirk-Cocaine
Kirk-Cocaine
  • Member since: Aug. 17, 2003
  • Offline.
Forum Stats
Moderator
Level 38
Programmer
Response to Different screen sizes Jun. 12th, 2012 @ 03:40 PM Reply

At 6/12/12 02:45 PM, alwayssim wrote: Or alternatively, would upgrading to CS6 give me any more features for creating apps?

I do believe CS6 has more emulator options, and it's certainly easier to update your AIR SDK. You should be targeting AIR 3.3.

Are these options only available in flash builder? I can't seem to find them on CS5.5

No, they're just standard AS3:

stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;

Although nativeWindow is only available in AIR:

stage.nativeWindow.height


The water in Majorca don't taste like what it oughta.

| AS3: Main | AS2: Main | Flash Tutorials |

BBS Signature
alwayssim
alwayssim
  • Member since: Dec. 4, 2011
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Different screen sizes Jun. 12th, 2012 @ 04:53 PM Reply

At 6/12/12 03:40 PM, Kirk-Cocaine wrote:
I do believe CS6 has more emulator options, and it's certainly easier to update your AIR SDK. You should be targeting AIR 3.3.

Are these options only available in flash builder? I can't seem to find them on CS5.5
No, they're just standard AS3:

stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;

Although nativeWindow is only available in AIR:

stage.nativeWindow.height

Thanks for all the help! I'm going to go watch some CS6 propaganda and probably end up upgrading.