# Preloader Code Problem?

**URL:** <https://forum.kirupa.com/t/preloader-code-problem/167696>\
**Category:** flash\
**Created:** [October 31, 2005, 3:43am UTC](https://forum.kirupa.com/t/preloader-code-problem/167696 "2005-10-31T03:43:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![woodman650](https://avatars.discourse-cdn.com/v4/letter/w/b9bd4f/32.png) [@woodman650](https://forum.kirupa.com/u/woodman650)\
**Post date:** [October 31, 2005, 3:43am UTC](https://forum.kirupa.com/t/preloader-code-problem/167696/1 "2005-10-31T03:43:40Z")

</div>

Hey all,  
I’ve been searching like a madman, trying to figure out how to construct a preloader for the thumbnails in the xml gallery here on Kirupa. So far, I’ve got

```auto
 
this.onEnterFrame = function() {
 nfilesize = tscroller.getBytesTotal();
 nloaded = tscroller.getBytesLoaded();
 thumbpreload._visible = true;
 if (nloaded != nfilesize) {
  thumbpreload.thumbpreloadbar._xscale = 100*nloaded/nfilesize;
 } else {
  thumbpreload._visible = false;
 }
};

```

I’m having 2 problems (that I know of)… I’m not sure that “tscroller” is the movieclip I want to preload for the thumbnails, and I can’t get my movieclip entitled “thumbpreload” (which is set \_visible = true; here) to show up. This preload function seems to conflict with the main image preloader and cause it to stop working. Any help would be greatly appreciated! thanks guys

the file I’m using can be found here:

[http://www.kirupa.com/developer/mx2004/code/thumbnail\_final.zip](http://www.kirupa.com/developer/mx2004/code/thumbnail_final.zip)
