Jump to content


[solved] Trap error from XML defined loader

Recommended Posts

Hi I'm sure this is simple but can you listen for an onError or onFail event from a loader created via xml.




My xml has this:


if this file is missing my flash output window states:

Error on SWFLoader 'MGGO' (monopolygoldtwtw_MG_GO1.swf): Error #2032: Stream Error.etc etc as expected.


I want my loader to be able to listen for any error created via this XML load method. Is there a catch all for loaderMax errors?




Link to comment
Share on other sites

you can add an onChildFail listener to the XMLLoader:


onChildFail : Function - A handler function for LoaderEvent.CHILD_FAIL events which are dispatched each time any nested LoaderMax-related loaders that were defined in the XML fails (and its status chances to LoaderStatus.FAILED). Make sure your onChildFail function accepts a single parameter of type LoaderEvent (com.greensock.events.LoaderEvent).


http://www.greensock.com/as/docs/tween/ ... oader.html

Link to comment
Share on other sites

Thanks Carl also discovered the skipFailed feature.



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.