Jump to content
Search Community

Possible to reload XMLLoader xml document in background?

Mr Pablo test
Moderator Tag

Recommended Posts

In my application, I need to be able to download a new XML document from my server every 15 minutes, and if there are new assets in the list, I need to have LoaderMax reload the XML doc (with XMLLoader) and replace/swap the currently running LoaderMax instance, with the new one.

 

Also, there can be no visual interuption. the file download will be in the background, but I need to somehow switch to the new LoaderMax instance without the user knowing (for example, the assets play in order, looping round when it gets to the end. I need to be able to load the new list and play the next asset in the list, as if it were the original asset list)

 

Does this make sense and is it possible?

 

Thanks!

Link to comment
Share on other sites

Yes that sounds possible but probably a bit tricky. I'm confident there enough methods and events in LoaderMax so that you can know when there is new data, flush out the old data and then access the new loaders. Could take a bit of experimenting. I'd recommend stepping a way from your current project and trying to build a prototype with just a few ImageLoaders in your xml. 

Link to comment
Share on other sites

I did a barebones test, using images only, and using a button click to show the next asset in order.

 

I mapped a key to "reload" the same xml documnet (which I edited manually whilst I had the app open in debug) and it all seems to work!

 

Once the xml has been loaded into LaoderMax, its basically redundant, so it means I should be fine having my app automatically updated it via my API :)

 

Just hoping that it plays ball when dropped into my app which rotates the assets automatically!

  • Like 1
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.
×
×
  • Create New...