# Xml preloader help

**URL:** <https://forum.kirupa.com/t/xml-preloader-help/184035>\
**Category:** Uncategorized\
**Created:** [April 1, 2006, 7:23am UTC](https://forum.kirupa.com/t/xml-preloader-help/184035 "2006-04-01T07:23:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TurboMan](https://avatars.discourse-cdn.com/v4/letter/t/df788c/32.png) [@TurboMan](https://forum.kirupa.com/u/TurboMan)\
**Post date:** [April 1, 2006, 7:23am UTC](https://forum.kirupa.com/t/xml-preloader-help/184035/1 "2006-04-01T07:23:48Z")

</div>

Hello guys,

I need help.

I made a photo gallery from an example that scotty showed, but has no loader!

So I was looking at kirupa’s example (only the part of preloader):  
[http://www.kirupa.com/developer/mx20…togallery7.htm](http://www.kirupa.com/developer/mx2004/xml_flash_photogallery7.htm)

I inserted the code for loader

```auto

this.onEnterFrame = function() {
filesize = container.getBytesTotal();
loaded = container.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (container._alpha<100) {
container._alpha += 10;
}
}
};

```

The problem is :

1.without loader - it works just fine - here is the file :  
[http://www.hupogrammos.ro/zip/without\_loader.zip](http://www.hupogrammos.ro/zip/without_loader.zip)

2.with loader - works fine to, but there is a problem when the photo loads, please look!!! (the displayed photo starts out of stroke (or border) and finnaly ends in the right place - why?) - here is the file :  
[http://www.hupogrammos.ro/zip/with\_loader.zip](http://www.hupogrammos.ro/zip/with_loader.zip)
