# SWF randomly fails to load - doesn't throw ioError

**URL:** <https://forum.kirupa.com/t/swf-randomly-fails-to-load-doesnt-throw-ioerror/258046>\
**Category:** flash\
**Created:** [April 20, 2008, 8:30am UTC](https://forum.kirupa.com/t/swf-randomly-fails-to-load-doesnt-throw-ioerror/258046 "2008-04-20T08:30:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tibberous](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@tibberous](https://forum.kirupa.com/u/tibberous)\
**Post date:** [April 20, 2008, 8:30am UTC](https://forum.kirupa.com/t/swf-randomly-fails-to-load-doesnt-throw-ioerror/258046/1 "2008-04-20T08:30:24Z")

</div>

I have this class:

```php

    public class LogoManager extends Sprite{
        function LogoManager(x){
            var loader:Loader = new Loader();
            
            function loaded(evt:Event){
                trace('worked');
                addChild(evt.target.content);
            }
            function failed(evt){
                trace('failed');
            }

            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
            loader.contentLoaderInfo.addEventListener('ioError', failed);
            loader.load(new URLRequest(x+'.swf'));
        }
    }

```

Periodically, it fails to load the swf, which is weird because the swf is a local file. If it fails, it doesn’t call the failed function, or the loaded function.

Does anyone know why it would work sometimes and not others? Is it just a bug that happens when I run it locally? Will it still break o the server? Is there a good way to check for and handle it – maybe a different error message it is throwing, or some way to retry after X seconds?
