How to resolve Adobe Flex error: "Error #2036: Load Never Completed"?
The problem was with mis-locating the SWF modules. As soon as appropriate location was set for generated SWF modules - the error disappear.
/dir/someSWFFile.swf
instead of someSWFFile.swf
) –
Bull 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...
}
The problem was with mis-locating the SWF modules. As soon as appropriate location was set for generated SWF modules - the error disappear.
/dir/someSWFFile.swf
instead of someSWFFile.swf
) –
Bull 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:)
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.
© 2022 - 2024 — McMap. All rights reserved.