# Preloader help!

**URL:** <https://forum.kirupa.com/t/preloader-help/251294>\
**Category:** Uncategorized\
**Created:** [February 7, 2008, 12:19am UTC](https://forum.kirupa.com/t/preloader-help/251294 "2008-02-07T00:19:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shii](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@Shii](https://forum.kirupa.com/u/Shii)\
**Post date:** [February 7, 2008, 12:19am UTC](https://forum.kirupa.com/t/preloader-help/251294/1 "2008-02-07T00:19:44Z")

</div>

I used the following code to create a preloader for my website:

stop();  
mask\_mc\_height = 1;  
this.onEnterFrame = function():Void {  
var loadedData:Number = this.getBytesLoaded();  
var allData:Number = this.getBytesTotal();  
var percent:Number = Math.round(loadedData/allData\*100);  
mask\_mc.\_yscale = percent;  
if (loadedData\>=allData) {  
gotoAndStop(10);  
delete this.onEnterFrame;  
}  
};

and this worked fine. However, my website is split into pages which I made in flash using frames. Some of these frames are gallery pages, where the thumbnails are loaded from an xml file into a movieclip automatically when the page is loaded. These took a while to load, so I tried to put a preloaded for each page of my website, following exactly the same form as the one above. However, they don’t work - the pages load instantly and then the thumbnails still have to load.

(if you go to [my site](http://daiesthai.freehostia.com) and click on any of the ‘polaroid’ icons you’ll see what I mean)

I’ve been searching for days for a tutorial that would show my how to make a preloader to load my thumbnail gallery but failed and thought this might work but it doesn’t seem too…

Does anybody have any suggestions?
