Hussamadin
Hussamadin

Reputation: 23

Targeting Multiple Resolutions Using Flex 4.5

I'm developing a game for Android tablets using Flash Builder 4.5. It has been implemented successfully on Galaxy Tab 7.0", but now I need to edit it in order to fit all android tablets. I attempted searching for information on this, but nothing I found was useful.

Should I use multiple graphics to target devices with different resolutions and, if so, how then should I detect the correct resolution? Or, on the other hand, should I use just one graphic and scale it to fit all resolutions required?

I would also appreciate any good tutorials specifically for games rather than applications, if there are any.

Upvotes: 2

Views: 322

Answers (1)

Robusto
Robusto

Reputation: 31883

You can use vector-based graphics that will look sharp at different densities. See Adobe's article on the matter.

Alternatively, you can use different graphic sources for each bitmap depending on resolution. From the same article:

<s:Button>
    <s:icon>
        <s:MultiDPIBitmapSource
            source160dpi="@Embed('/assets/refresh160.png')"
            source240dpi="@Embed('/assets/refresh240.png')"
            source320dpi="@Embed('/assets/refresh320.png')"/>
    </s:icon>
</s:Button>

Note that the icon on this button has a different graphic depending on each platform's native pixel density. This makes the application heavier, but if you don't have a ton of graphics (and your images are optimized for size), you should be fine.

Upvotes: 2

Related Questions