# IOErrorEvent.IO\_ERROR doesn't fire online

**URL:** <https://forum.kirupa.com/t/ioerrorevent-io-error-doesnt-fire-online/274432>\
**Category:** flash\
**Created:** [October 30, 2008, 12:04am UTC](https://forum.kirupa.com/t/ioerrorevent-io-error-doesnt-fire-online/274432 "2008-10-30T00:04:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![watcher](https://avatars.discourse-cdn.com/v4/letter/w/77aa72/32.png) [@watcher](https://forum.kirupa.com/u/watcher)\
**Post date:** [October 30, 2008, 12:04am UTC](https://forum.kirupa.com/t/ioerrorevent-io-error-doesnt-fire-online/274432/1 "2008-10-30T00:04:04Z")

</div>

Wow! i can’t actually believe nobody posted this (i must have made a mistake myself somewhere).

The problem is, when i am using Loader for loading pictures, and then **if i supply bad url and i wanna catch that** , so **i use IOErrorEvent.IO\_ERROR** on myLoader.contentLoaderInfo object, then the **IOErrorEvent DOES NOT TRIGGER ONLINE**! [woot?]  
**IT DOES** , however, **TRIGGER** when tested **OFFLINE** (from within flash IDE publish).

Here is the code i am using:

```auto

// misspelling on purpose,
// correct image name is 'image.jpg'
var _content:String = "imagge.jpg";
var _loader:Loader;

// load external content
var request:URLRequest = new URLRequest( _content );
_loader = new Loader( );
_loader.x = 300;
_loader.contentLoaderInfo.addEventListener( Event.COMPLETE, draw );
_loader.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, onIOError );
_loader.load( request );
addChild( _loader );

_text.appendText( "loading: "+_content+"
" );

function draw( event:Event ):void {
	_text.appendText( "Complete!
" ); // works well online, if all correct
};

function onIOError( event:IOErrorEvent ):void {
	_text.appendText( "IOERROR!
" ); // does not trigger online (no text appended)
};

```

[HERE](http://www.michalfiala.com/data/help/20081030-IOErrorEvent_not_triggering_online.rar) are the files.  
[HERE](http://www.michalfiala.com/data/help/preview/IOErrorEvent_not_triggering_online.swf) is online example.

What am i doing wrong? 🙂
