Photo Gallery Preloader Integration

I took a look at lostinbeta’s jpeg preloader code:
this.createEmptyMovieClip(“preloader”, 1000);
this.createEmptyMovieClip(“container”, 1001);
container.loadMovie(“yourImage.jpg”);
container._visible = false;
preloader.onEnterFrame = function() {
****var l = container.getBytesLoaded();
****var t = container.getBytesTotal();
****var getPercent = l/t;
***loadText = Math.round(getPercent100)+"%";
***loadBar._width = getPercent100;
****if (l>0 && l>=t) {
********container._visible = 1;
********delete this.onEnterFrame;
****}
};

now I am wondering how to integrate this with the Photo Gallery in the tutorial.

I did a search on this and cant find what I need.

Thanks