# Preloader images with xml problem

**URL:** <https://forum.kirupa.com/t/preloader-images-with-xml-problem/227325>\
**Category:** flash\
**Created:** [May 29, 2007, 1:08pm UTC](https://forum.kirupa.com/t/preloader-images-with-xml-problem/227325 "2007-05-29T13:08:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![swiftflash](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@swiftflash](https://forum.kirupa.com/u/swiftflash)\
**Post date:** [May 29, 2007, 1:08pm UTC](https://forum.kirupa.com/t/preloader-images-with-xml-problem/227325/1 "2007-05-29T13:08:19Z")

</div>

I made my gallery using the squirell finder and a tutorial on the internet about preloading images and this is what i got.

```auto

function DisplayInfo(){
    infoField._visible = true;
    startLoading(this.images_h);

    trace(this.images_h); // images/studio.jpg
}

// Preloader image (viewer)
function startLoading(whichImage) {
   loadMovie(whichImage, "viewer");
   _root.onEnterFrame = function() {
      infoLoaded = viewer.getBytesLoaded();
      infoTotal = viewer.getBytesTotal();
      percentage = Math.floor(infoLoaded/infoTotal*100);
      infoField.text = percentage+"%";
      if (percentage>=100) {
         delete this.onEnterFrame;
         infoField._visible = false;
      } 
      trace(percentage);
   };
  
}

```

“viewer” is my image holder. My images load 100% or 0% if i put a bigger picture in my file it only keeps repeating 000000000000000 in my output box. What am i doing wrong?

Preloader tutorial: [Lukamaras.com](http://www.lukamaras.com/tutorials/actionscript/load-jpg/loading-external-jpg-image.html)
