Problem with Preloader

Ok people, here is my thing.
I loaded a XML and made a gallery with it, like a grid one!

Here is part of the code: http://pastebin.com/m50f5f3be

The problem is on the preloader!
I just can’t make it work!

I need this kind of preloader for a lot of things… to load a lot of swfs and to things like this xml galleries for example!
Like an “external” preloader! A preloader i can apply to everything… can’t understand why doesn’t work.