# Load default image if 'URL Not Found'

**URL:** https://forum.kirupa.com/t/load-default-image-if-url-not-found/289599
**Category:** flash
**Created:** [June 2, 2009, 12:02pm UTC](https://forum.kirupa.com/t/load-default-image-if-url-not-found/289599 "2009-06-02T12:02:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Tedri\_Mark](https://avatars.discourse-cdn.com/v4/letter/t/51bf81/32.png) [@Tedri\_Mark](https://forum.kirupa.com/u/Tedri_Mark)
#### Post date: [June 2, 2009, 12:02pm UTC](https://forum.kirupa.com/t/load-default-image-if-url-not-found/289599/1 "2009-06-02T12:02:27Z")

</div>

Hey there, I’ve got a slideshow which runs from an XML file, and at the moment, if the image specified in the XML file isn’t there, I get an error

> Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

and here is the function which loads the image:

```auto
private function Load_thumbnail():void
        {
            for (var i:uint = 0; i<numphot; i++)
            {
                var myLoader:Loader = new Loader();
                var myRequest:URLRequest = new URLRequest(thumb*);
                myLoader.load(myRequest);
                myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, Thumb_loaded);
                pInfor[myLoader] = i;
            }
        }

```

What I want to do is load a default .jpg if the URL is not found, I have no idea of how to go about this, so any help would be gratefully appreciated…
