Jump to content

Preload progress indicator


owen
 Share

Recommended Posts

Hi

 

I have dozens of sprite sheets and images that I'm preloading in my preload() function and it's starting to take a few seconds, so I need to tell the user it's preloading and how complete that is.  At the moment I'm adding 1 to a counter of preloads after each loading of a spritesheet or image and then displaying the counter.  But it doesn't seem to work; it just adds them all up instantaneously and carries on preloading.  In other words the preload seems to continue happen in the background after I display the counter.  And so it gets stuck at 100% and sits tehre for a few seconds while in reality things are still being loaded.

 

 

What I need is a very simple example of a working preload() function which shows progress of the load  (ideally adds 1 to a counter per item loaded). It does not have to be a progress bar, I would settle for a 'Loading file 1 of 10' text progress.  (Though if a progress bar is easier that's fine).

 

Is there a standard / accepted way of doing this?

 

thanks

Owen

Link to comment
Share on other sites

  • 2 weeks later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...