# iOS app image Assets problem

**URL:** https://forum.kirupa.com/t/ios-app-image-assets-problem/331825
**Category:** flash
**Created:** [November 1, 2013, 11:17am UTC](https://forum.kirupa.com/t/ios-app-image-assets-problem/331825 "2013-11-01T11:17:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![zeeto](https://avatars.discourse-cdn.com/v4/letter/z/e274bd/32.png) [@zeeto](https://forum.kirupa.com/u/zeeto)
#### Post date: [November 1, 2013, 11:17am UTC](https://forum.kirupa.com/t/ios-app-image-assets-problem/331825/1 "2013-11-01T11:17:19Z")

</div>

Hello,

I’m trying to develop very simple image portfolio app for iOS using AS3.  
I have difficulties to understand how to include image assets for my app.

Due to various resolutions of the devices, I have various files for every image, for example:  
image\_480.png  
image\_960.png  
image\_1024.png  
image\_1136.png  
image\_2048.png

Now, depending on the detected device resolution I want app to load appropriate image (“image\_” + version + “.png”).  
The problem is I don’t know how to include all the images within my app to access them.

My code:

```auto

package {        
    import flash.display.Bitmap;    
    import flash.display.Loader;
    import flash.display.MovieClip;
    import flash.events.Event;
    import flash.net.URLRequest;

    public class zeeto extends MovieClip {
        private var image: Bitmap = new Bitmap;
        private var loader: Loader;
        private var stageW: int;
        private var imageW: int;

                         public function zeeto() {
            addEventListener(Event.ADDED_TO_STAGE, init);
        }                

        private function init(e:Event):void {
           removeEventListener(Event.ADDED_TO_STAGE, init);

           // Stage test
           stageW = stage.stageWidth;

                                   if (stageW > 1136) imageW = 2048;
                                   else if (stageW > 1024) imageW = 1136;
                                   else if (stageW > 960) imageW = 1024;
           else if (stageW > 480) imageW = 960;
           else imageW = 480;

                                   image.smoothing = true;

           loader = new Loader();
           loader.contentLoaderInfo.addEventListener(Event.COMPLETE, displayImage);
           loader.load(new URLRequest("app:/Assets/image_" + imageW + ".png"));
        }

        private function displayImage(e:Event):void {
           image = loader.content as Bitmap;
           image.x = 0 - ((image.width - stage.stageWidth) / 2);
           image.y = 0 - ((image.height - stage.stageHeight) / 2);
           addChild(image);
        }
                 }
}

```

Structure of the project files:  
zeeto.ipa  
zeeto.fla  
com/zeeto/zeeto.as

Where do I put the “Assets” folder and how to tell the compiler to include it’s content within zeeto.ipa file?

Thank you
