PrimaryFeather/Starling-Framework — pull request #514 by Fraggle (2014-03-25 17:27:18+00:00)
Title: Add event when a url loader has completed

Hi,

I'm looking into adding some sort of caching to AssetsManager.
My plan is to copy the loader's data to a local cache folder after loading an external resource then use that local url instead of the external url on subsequents loading.

However, at the moment I'm not sure where to hook my code to do the "put in cache" thing and even after looking carefully at the code, it seems impossible without beeing "invasive" :-)

I propose to add this simple event to let me hook my own "save to cache" code easily.
Using the urlLoader as event data, I can retrieve the url and the byte array and do my stuff.

Thanks for considering it (or pointing me to the right direction if you see a better way to do it).

Btw, I written the code "blind" (directly on github) so it may not be perfect.