# Using Loader to load .png not working on iOS

**URL:** https://forum.kirupa.com/t/using-loader-to-load-png-not-working-on-ios/326306
**Category:** flash
**Created:** [December 6, 2011, 11:03am UTC](https://forum.kirupa.com/t/using-loader-to-load-png-not-working-on-ios/326306 "2011-12-06T11:03:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dst1](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@dst1](https://forum.kirupa.com/u/dst1)
#### Post date: [December 6, 2011, 11:03am UTC](https://forum.kirupa.com/t/using-loader-to-load-png-not-working-on-ios/326306/1 "2011-12-06T11:03:55Z")

</div>

So I’m trying to load a .png and display it but the iPad and iPhone show a white screen. Here is my code:

```auto

public class Test extends Sprite
    {
        private var loader : Loader;
        private var urlRequest : URLRequest;

        public function Test()
        {
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align = StageAlign.TOP_LEFT;
            
            loadAssets();
        }

        private function loadAssets() : void
        {
            urlRequest = new URLRequest("TestImage.png");
            loader = new Loader();
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
            loader.load(urlRequest);
        }

        private function onLoadComplete(event : Event) : void
        {
            addChild(loader.content);
        }
    }

```

This works fine when tested in AIR but not when I test on the device using the [TEST on DEVICE] build. My TestImage.png is in the bin folder where my Test.swf gets compiled into.
