 Chris Born
|
<p>We are developing a couple of educational Air applications, or rather updating them with new versions. The asset for these (images and video) would greatly benefit from post app install download and caching from on-demand viewing. Basically install the app then using the xml-config download the assets. This keeps the app size much lower. Any thoughts on using AssetLoader for this type of situation?
</p>
|
 Matan Uberstein
|
Hi Chris,
Yes, I’ve had this request before Eventually I’d like to build and AssetLoader extension that does this for you. E.g. You have the standard ILoader instance which you can simply pass to a “FileWriter” class that saves the loaded file to the local machine.
What you can do when you app starts up is load the xml-config off the server, but check for a local version first. If the local version is outdated you can simply load the assets off the server again. After the downloads are complete you can recursively run through the assets, create the corresponding File instances and FileStream instances to save them locally.
Have a look at this example: Storing data locally in AIR[/url] – It’s not using AssetLoader but the concept is there.
Hope that helps! And sorry for the late reply.
|