Jump to content
Search Community

XMLloader sometimes skips images

Geeoff test
Moderator Tag

Recommended Posts

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

Link to comment
Share on other sites

Maybe it was a coincidence that it skipped a few on that test. I've been working on it and it just skipped a picture on a standard load -- that is, just one browser window loading this site, no heavy loading across several pages. Right at the moment I'm remaking all the external jpgs to see if there's something in there. Desperation, I think.

Link to comment
Share on other sites

Now any browser load is losing a picture or two in the portfolio.

This is the same code that was working fine all month.

If anyone can be of help on a simple error catcher (see code above) to get this started, I would be grateful.

I imagine I'm bumping into cache and that's why each reload gives the same error, but then I don't know how the cache handles a file that errored out.

It's late, I think I'm rambling. I'll get back to this tomorrow.

Link to comment
Share on other sites

To restate the problem:

I have a flash portfolio that displays 30 thumbs that link to 30 larger images. There are descriptions and titles that accompany each thumb and picture. Everything loads from an XMLloader.

 

I’m seeing random images fail to load - sometime as many as four out of 30. Seems excessive.

 

I’m going to put a function together using the event.target of the failure to try to reload the file, but I think my problem is that I don’t quite understand what’s happening. When I flush the cache on my machine and reload, either it comes in fine or a different set of images is missing. If anybody has a clue what direction to point me in, I would appreciate it.

Thank you.

Link to comment
Share on other sites

It sounds like maybe there's an issue with the server or your system. Tough to say. Are you using the latest version of LoaderMax? I'd definitely recommend getting the latest version just to be sure. http://www.greensock.com/loadermax/. Otherwise, feel free to post a simple FLA that demonstrates the issue and we'd be happy to take a peek. It's just very difficult to troubleshoot blind, so a simplified FLA would be great (no need to post your production files - just create the simplest possible FLA that reproduces the problem).

Link to comment
Share on other sites

I was using the March version of the software. Downloading the latest seems to have solved the problem. I’ve seen you tell everyone to use the latest version, I just got worked up and forgot.

I flushed the cache and reloaded several times, rebooted the machine - I think I've given it a workout and it’s functioning quite nicely.

 

If for any reason you would still like to see this, attached is an .fla and an .xml that are reduced to just the areas that were apparently causing the problem.

 

Thank you very much for your help. As everyone has said, you’ve created some truly wonderful software.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...