Preloader for dynamic images

I have been searching every forum I know of, and treid every tutorial I can find.

How can you create a preloader to dynamically load images that goes from 0% to 100% once for all of the images, not 0 to 100 for each of the images?