Karthik
Karthik

Reputation: 137

FLEX AIR project directory structure for storing LOW and HIGH resolution images

Any idea what directory structure should one follow for Flex AIR projects in which there is need to store both low and high resolution images so that the low-res images will be used when the app is loaded in a MOBILE and hi-res image will be used when loading the app in a TABLET.

Upvotes: 1

Views: 169

Answers (1)

Alexander Farber
Alexander Farber

Reputation: 23038

Here is how I do it:

<fx:Declarations>
    <s:MultiDPIBitmapSource id="BACK"
        source160dpi="@Embed('assets/icons/low-res/back.png')"
        source240dpi="@Embed('assets/icons/mid-res/back.png')"
        source320dpi="@Embed('assets/icons/high-res/back.png')"/>
</fx:Declarations>

<s:states>
    <s:State name="portrait"/>
    <s:State name="landscape"/>
</s:states> 

<s:navigationContent>
    <s:Button icon="{BACK}" label.landscape="Back" click="navigator.popView()"/>
</s:navigationContent>

See the doc Support multiple screen sizes and DPI values in a mobile application

Upvotes: 1

Related Questions