Thank you for your wonderful software.
I can’t seem to find an answer to an XMLloader problem I’m having.
I’ve created a simple flash portfolio, which loads thumbnails, large images and text through XMLloader.
Putting it up on a test site, it works just fine. One of my final tests for a site, though, it to have a browser automatically load it with ten or more other web pages at once. I'm sure there will be viewers who do that.
This time, a few of the thumbnails (and sometimes one of the big pictures) didn’t load. Okay, with all those sites banging around, who knows what happened? I put an errorHandler in the code, something simple that would get me started on troubleshooting.
var xList:XMLList = new XMLList();
var loader:XMLLoader = new XMLLoader("gbhPortfolio.xml", {onComplete:completeHandler, onProgress:progressHandler, onError:errorHandler, estimatedBytes:5000000, noCache:true});
function errorHandler(event:LoaderEvent):void{
trace("error is " + event.target + ": " + event.text);
eT = eT + "error is " + event.target + ": " + event.text;
errorText.text = eT;
loader.cancel();
loader.unload();
loader.load(true);
}
"eT" is a String variable that holds the list of errors and displays it on the screen in a text box calle "errorText", since trace doesn't work on an active site.
The error handler cancels the loader, unloads it and starts it up again, but if the error was on picture number three, the reload will throw an error on picture number three and just keep looping on the same error. This is the first time I've used XMLloader in a project, so I don't doubt I've missed something. I've looked through the forums and done several searches on the internet. I've always found greensock to be clear and easy to understand, but today I am staring at a blank wall.
The main site is http://geoffreyhartig.com and the test site with a text overlay of the error messages is http://geoffreyhartig.com/x