I've written a MP3 player for podcasts, and I am using the
Sound.load() to load the MP3 file from a URL. From time to time,
the download fails ... and an error occurs.
I am able to catch the error just fine ... but now what? How
do I restart the load? Or how do I recover from the failed
Right now, I start the load, and also begin to play the sound
to the user ... so they can begin to listen. In some cases I have
seen the download of a 60 minute podcast fail at - maybe - 43:29.
So they are listening, and might be 10-15 minutes in ... I catch
the error ... and now what?
I can't seem to find any documentation on what to do at this
You could use a custom event. In your error handling code
dispatch your custom event, passing in something, like maybe the
path to file to be loaded, then try to reload. Everytime it fails
you will retry.