Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Mobile /

Sizing graphics correctly across screens

by Paul Trani

Paul Trani
  • Adobe

Content

  • Screen specs
  • Sizing graphics appropriately
  • Always test
  • Where to go from here

Created

17 October 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
Flash Professional mobile multiscreen optimization

Requirements

Prerequisite knowledge

You should have some familiarity with ActionScript 3 and an understanding of vector and bitmap graphics.

User level

Beginning

Required products

  • Flash Professional (Download trial)

Gone are the days when all you had to do is make sure your graphics were 72dpi. With an influx of mobile web-ready devices and tablets comes new screen sizes, resolutions, and pixels per inch. You must now ensure that your mobile app graphics are the right size regardless of device.

Starting with the Apple iPad, tablet devices have been the device of the year. But the big question was whether it is a novelty or if it has lasting value. Business Insider reported that, among the 500 iPad owners it surveyed, usage has increased as much as 80 percent since first purchased. From personal experience, I can tell you that I use mine about an hour every day for both reading and games.

Screen specs

Knowing that tablet devices are here to stay, how do you design for them as well as for the the desktop and other mobile devices? Table 1 reviews the screen specs of the most popular tablets.

Table 1. Comparing specs for various mobile devices

Desktop Mobile devices Tablets
Screen size 15" laptops
17" – 24" desktops
4.3" Droid X
3.7" Droid 2
3.5" Apple iPhone 4
7" Samsung Galaxy Tab
7" BlackBerry PlayBook
9.7" Apple iPad
Resolution 1024 × 768 (20%)
1280 × 800 (higher 76%)
480 × 854 Droid 2
480 × 854 Droid X
640 × 960 iPhone 4
1024 × 600 Samsung Galaxy Tab
1024 × 600 BlackBerry PlayBook
1024 × 768 Apple iPad
Pixels per inch 72 264 Droid 2
227 Droid X
326 ppi iPhone 4G
170 Samsung Galaxy Tab
170 BlackBerry PlayBook
133 Apple iPad
Platform Windows
Mac
Android 2.2
iOS
Android 2.2
BlackBerry Tablet OS
iOS

Sizing graphics appropriately

When it comes to the desktop, you could easily make a button that's 100 pixels wide by 30 pixels high and trust that the user could select it with their mouse pointer, since the pixels per inch (or dots per inch) was 72. When it comes to tablets and mobile devices, however, the pointer is replaced by a finger and the resolution is no longer 72dpi. Both of these factors make button size very important.

Note: As you work with bitmap graphics, be aware that the larger the DPI, the larger your file size. Refer to the resources at the end of this article to learn more about optimizing graphics.

Finger size

If you measure an average adult's fingerprint, it's at least a half-inch square. That's why the icons on iOS devices are this size. Therefore, tat is the size you want for your button. But how do you ensure that the button will be a half-inch on all devices?

Pixels per inch

Before you get into sizing content, you need to make sure that nothing scales automatically:

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

A quick look at these specs reveals that the pixels per inch (ppi) varies. To make sure a button is always 0.5" square, just multiply the ppi (also known as dpi) by 0.5. In ActionScript 3 it would look like this:

next_btn.width = 133 * .5; next_btn.height = 133 * .5;

But you really don't want to do this calculation for every device. Luckily, in Adobe Flash Professional you can use the Capabilities.screenDPI property to determine the screen DPI of the device. Then just multiply that by 0.5:

next_btn.width = Capabilities.screenDPI * .5; next_btn.height = Capabilities.screenDPI * .5;

So as not be too American-centric, here's a version of the code for determining the pixel size of your button if you know its size in millimeters instead of inches:

next_btn.width = Capabilities.screenDPI * (mm / 25.4); next_btn.height = Capabilities.screenDPI * (mm / 25.4);

Always test

Because Android 2.2 isn't built for tablet devices—even though there are tablet devices on the market (such as the Samsung Galaxy Tab)—the Capabilities.screenDPI property will give a wrong resolution of 240 when the real resolution is 170. You will have to perform an extra check and change appropriately:

if (Capabilities.manufacturer == "Android Linux" && Capabilities.screenResolutionY == 1024) { next_btn.width = 85; next_btn.height = 85; }

Figure 1 shows the button sized properly across three devices: Droid 2, iPad, and Samsung Galaxy Tab.

fig01
Figure 1. Play button sized appropriately across three devices

Where to go from here

To find out more about the Capabilities.screenDPI property, check out the following article and references:

  • Authoring mobile Flash content for multiple screen sizes
  • flash.systemCapabilities class (ActionScript 3 Reference for the Flash Platform)
  • mx.coreRuntimeDPIProvider class (ActionScript 3 Reference for the Flash Platform)

As you work with bitmap graphics, be aware that the larger the DPI, the larger your file size. Refer to these videos of mine to learn more about optimizing graphics:

  • Screen density (Adobe TV)
  • Optimizing graphics with ActionScript (Adobe TV)
  • Optimizing graphics on the Stage in Flash Professional (Adobe TV)

You can also learn about optimizing graphics using a tool like Adobe Fireworks CS5:

  • Design Learning Guide for Fireworks: Optimizing files for multiple exports
  • Optimizing and exporting graphics (Fireworks documentation)


This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 Unported License.

More Like This

  • Delivering video for Flash Player on mobile devices
  • Research In Motion and Adobe Systems alliance
  • Building a List component in Flash Lite
  • Designing for the RIM BlackBerry PlayBook
  • Optimizing performance of applications for connected TVs
  • Taking your brand mobile
  • Developing games for Nokia S60 Touch devices
  • Protecting Flash Lite content packaged in a Symbian installer with OMA DRM 1.0 Forward Lock
  • Building Flex mobile applications with Flash Builder "Burrito" preview and BlackBerry Tablet OS SDK
  • Flash sizing Zen: Making Flash fit on mobile devices

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement