# Photo Gallery Preloader Integration

**URL:** <https://forum.kirupa.com/t/photo-gallery-preloader-integration/51843>\
**Category:** flash\
**Created:** [May 17, 2004, 8:26pm UTC](https://forum.kirupa.com/t/photo-gallery-preloader-integration/51843 "2004-05-17T20:26:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Camokid](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@Camokid](https://forum.kirupa.com/u/Camokid)\
**Post date:** [May 17, 2004, 8:26pm UTC](https://forum.kirupa.com/t/photo-gallery-preloader-integration/51843/1 "2004-05-17T20:26:00Z")

</div>

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(getPercent_100)+"%";  
\*\*\*_loadBar.\_width = getPercent_100;  
\*\*\*\*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
