Copy link to clipboard
Copied
I have a slidshow inside of a flash page. It works great on my desktop, but when I upload it to a server I get the infamous Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed. I initially assumed that I must have missed uploading a file, so I uploaded the whole folder, Photoshop files and all, thinking that I could start deleting things until I found the culprit. But even after I uploaded everything that I have, the browsers still gave me the same error with no slide show. I'm wondering if my call to the .swf (from inside a .swf) needs to be different on a server.
Here's the code:
import flash.net.*;
var slideShowRequest:URLRequest = new URLRequest("slideShow2.swf");
var slideShowLoader:Loader = new Loader();
slideShowLoader.load(slideShowRequest);
slideshow_mc.addChild(slideShowLoader);
Copy link to clipboard
Copied
Could the issue be that the swf you are loading hasn't completely loaded into the loader before you add it to your movieclip?
What happens if you wait for the complete event on the loader and then attempt to add it to the movieclip?
import flash.net.*;
var slideShowRequest:URLRequest = new URLRequest("slideShow2.swf");
var slideShowLoader:Loader = new Loader();
slideShowLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
slideShowLoader.load(slideShowRequest);
function onLoadComplete(evt:Event)
{
slideshow_mc.addChild(MovieClip(evt.target.content));
}
This way you will be certain the swf is completely loaded before you attempt to access it?
Copy link to clipboard
Copied
That was a really good idea, one that I'll be implementing from now on. The event.COMPLETE did seem to make a difference in that the error took longer to pop up, but it's still giving me the same error ... but only on the server. (weird)
Thanks for the input.
Copy link to clipboard
Copied
I did some more research off of the Adobe TechNote and copy/pasted the code that was provided for loading a .swf into a .swf. The code worked fine on my desktop, but once again it doesn't work once I upload it to my GoDaddy account. I have got to be missing something simple! I know that the parent .swf and the 2nd .swf are uploaded to the same directory, so why the error? Why does I keep getting the Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.
The new code:
var myLoader:Loader = new Loader();
addChild(myLoader);
var url:URLRequest = new URLRequest("slideShow2.swf");
myLoader.load(url);