Xml preloader help

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

I inserted the code for loader


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

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