Need help about preloader on gallery thumbnails

hi,

i’m trying to make a “simple” XML gallery.
first, thumbnails appear on screen, with preloader for each small images.

no pb for my small images : they appear in the movie clip ( duplicated ).

so, i’ve got problem to put a small bar progress in each thumbnail…

actually, this is my code ( only the part of the preload for thumb ):


urlThumbnail = this.firstChild.childNodes*.attributes.urlThumb;
            tableUrlThumbnail.push(urlThumbnail);
            //------------ loading  thumbs ----------------------
            var temp = _this.createEmptyMovieClip(temp, 998);
            this.temp.onEnterFrame = function() {
                var loaded:Number = _this["thumb"+i].contThumb.getBytesLoaded();
                var total:Number = _this["thumb"+i].contThumb.getBytesTotal();
                var percent:Number = Math.round((loaded/total)*100);
                trace(loaded);
                _this["thumb"+i].progressBar._xscale = percent;
                if (_this["thumb"+i].contThumb._width) {
                    delete this.onEnterFrame;
                    trace("loading ok");
                }
            };
            _this["thumb"+i].contThumb.loadMovie(tableUrlThumbnail*);

i’ve got a question too : does i must create a temp var for EACH thumb ?
( —> var temp = _this.createEmptyMovieClip(this[“temp”+i], 998+i);
)

thanks,

regards,

stef