Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Chetan Sachdev

Do I need to call .load() method multiple times

Recommended Posts

I am trying to use LoaderMax API, in an existing application. To replace all http calls with LoaderMax, I have written a Singleton class, which keeps an instance of LoaderMax object. Now, in my application, wherever a http request is needed, I get an instance of single LoaderMax object and append to the queue, with a callback handler. My question, do I need to call the .load method everytime, I append a URL, or LoaderMax looks internally for the queue length? 

Link to comment
Share on other sites

If you set autoLoad to true in the LoaderMax constructor it should work exactly how you wish.

 

autoLoad : Boolean - If true, the LoaderMax instance will automatically call load() whenever you insert()/append()/prepend() a new loader whose status is LoaderStatus.READY. This basically makes it easy to create a LoaderMax queue and dump stuff into it whenever you want it to load without having to check the LoaderMax's status and call load() manually if it's not already loading.

 

http://api.greensock.com/as/com/greensock/loading/LoaderMax.html

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.
×