How to resolve Adobe Flex error: "Error #2036: Load Never Completed"?
Asked Answered
G

4

6

How to resolve Adobe Flex error: "Error #2036: Load Never Completed"?

Geometer answered 4/8, 2009 at 14:25 Comment(1)
is that the best description you can come up with?Cyanocobalamin
G
5

The problem was with mis-locating the SWF modules. As soon as appropriate location was set for generated SWF modules - the error disappear.

Geometer answered 5/8, 2009 at 0:25 Comment(1)
In my case, the problem was also occurring when loading assets, not only .swf modules. (I fixed it by using absolute URLs: /dir/someSWFFile.swf instead of someSWFFile.swf)Bull
A
6

Don't forget you can also add an IOErrorEvent-listener to the loaders, so you can trace a bit more information for yourself. The code beneath is a general starter, it'll probably need a bit more information before it actually works in flash/flex.

swfLoaderInstance:SWFLoader = new SWFLoader();
swfLoaderInstance.source = "someSWFFile.swf";
swfLoaderInstance.addEventListener(IOErrorEvent.IO_ERROR, handleError);

public function handleError(event:IOErrorEvent):void{
    trace(event.target);
    //etc...
}
Adrea answered 27/1, 2010 at 20:38 Comment(0)
G
5

The problem was with mis-locating the SWF modules. As soon as appropriate location was set for generated SWF modules - the error disappear.

Geometer answered 5/8, 2009 at 0:25 Comment(1)
In my case, the problem was also occurring when loading assets, not only .swf modules. (I fixed it by using absolute URLs: /dir/someSWFFile.swf instead of someSWFFile.swf)Bull
U
1

If it's a internet browser thing, and you are using Google Chrome. Go to Histor>Clear all browsing Data. Tick in these thins only, you wouldn't want to lose the browsing data.

Empty the cache, Delete cookies and other site and plug-in data, Clear saved Autofill form data

Clear it from beginning of time. Then try to load the thing you want to. Worked for me fine:)

Utopia answered 22/2, 2013 at 3:36 Comment(0)
C
1

I had the same error message. In my case, it was due to the Loader getting garbage collected.

This is the code I had issues with:

private function loadImageFromUrl( imageUrl:String ):AbstractOperation
    {
        var result:AbstractOperation = new AbstractOperation();

        var loader:Loader = new Loader();
        loader.contentLoaderInfo.addEventListener( Event.COMPLETE, function ( e:Event ):void
        {
            result.dispatchCompleteEvent( loader.content );
        } );
        loader.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, function ( event:IOErrorEvent ):void
        {
            result.dispatchErrorEvent( event );
        } );
        loader.load( new URLRequest( imageUrl ) );

        return result;
    }

And this is the good code:

private var m_loaderReferences:Dictionary = new Dictionary();

private function loadImageFromUrl( imageUrl:String ):AbstractOperation
    {
        var result:AbstractOperation = new AbstractOperation();

        var loader:Loader = new Loader();
        m_loaderReferences[imageUrl] = loader; // Need to keep a reference to the loader to avoid Garbage Collection
        loader.contentLoaderInfo.addEventListener( Event.COMPLETE, function ( e:Event ):void
        {
            result.dispatchCompleteEvent( loader.content );
            delete m_loaderReferences[imageUrl];
        } );
        loader.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, function ( event:IOErrorEvent ):void
        {
            result.dispatchErrorEvent( event );
            delete m_loaderReferences[imageUrl];
        } );
        loader.load( new URLRequest( imageUrl ) );

        return result;
    }

I reference the loader from a Dictionary to avoid the GC. I remove the loader from the Dictionary when it is done loading.

Connotative answered 24/4, 2014 at 10:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.