Resizing/fading dynamic gallery issues

Hey there. I’m kind of in a huge deadline crunch.

I have a gallery that I built from a tutorial I found online–it has an empty mc with a border around it, and when you click on a thumbnail an image is loaded into the mc and it fades in when it loads in and out.

Ofcourse it works fine offline, but when I test it online the image will load in off-center, if you click the thumbnail again (after it has loaded the first time) it loads in the position it should be in.

Here is the code I have on the first frame:
spacing = 1;
containerMC._alpha = 0;

MovieClip.prototype.loadPic = function(pic){
containerMC._alpha = 0;
this.loadMovie(pic);
onEnterFrame = function(){
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1){
var w = containerMC._width + spacing, h = containerMC._height + spacing;
border.resizeMe(w, h);
delete this.onEnterFrame;
}
}

};
MovieClip.prototype.resizeMe = function(w, h) {
var speed = 3;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1) {
this._width = w;
this._height = h;
containerMC._x = this._x-this._width/2+spacing/2;
containerMC._y = this._y-this._height/2+spacing/2;
containerMC._alpha += 5;
if (containerMC._alpha>90) {
containerMC._alpha = 100;
delete this.onEnterFrame;
}
}
};
};

and here is the code that I have on my btns:
on(release){
_parent.containerMC.loadPic(“pic_001.jpg”);
}

Any suggestions???
I really need some quick help on this one.

Thanks so much in advanced!!!

hutch.