Jump to content


LoaderMax remove item issue

Moderator Tag

Recommended Posts

Hi guys,

I wonder if you can assist, I'm trying to code for the eventuality of a corrupt image getting loaded. I currently have the error event setup to remove the offending item:

function errorHandler(event:LoaderEvent):void
	trace("error occurred with event target:: " + event.target + "::and event text:: " + event.text);
	queue.remove(event.target as LoaderCore);

However it only appears to be removing the last child of the set of images, rather than just the event.target.

I've ran traces and event.target is pointing at the correct 'corrupt' image which fails to load as expected. The queue.remove is removing an item as a queue.numChildren trace reduces by one. What am I missing?




NB let me know if you want more info.

Link to comment
Share on other sites



Sorry to hear you are having trouble. That does sound like strange and unwanted behavior.


I made a simple test that loaded 4 images. The 2nd image was a bad url.

The failed image triggered the error, its loader was removed, the 3 good images loaded and at the end getChildren() showed that all 3 of the good loaders remained.


CS6 file attached.


Feel free to post a simplified version of your files that illustrates the error you are experiencing.


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.