Foto album

Can someone help me with this.
i know there were a several threads in the past but no one worked out for me.
I made a site www.gemeenteschoollatem.be/mainlatem.html and there under “Foto album” then “Bosklas” when you select on of the buttons for example “Busreis” and i push on one of the pictures sometimes all goes well but sometimes it goes wrong and the picture is placed in a small square, you will see.

My code is:

spacing = 10;
containerMC._alpha = 0;
MovieClip.prototype.loadPic = function(pic){
_root.containerMC._alpha = 0;
this.loadMovie(pic);
_root.onEnterFrame = function(){
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1 && containerMC._width !=0){
var w = containerMC._width + spacing, h = containerMC._height + spacing;
border.resizeMe(w, h);
delete _root.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;
_root.containerMC._x = this._x - this._width/2 + spacing/2;
_root.containerMC._y = this._y - this._height/2 + spacing/2;
_root.containerMC._alpha = 100;
delete this.onEnterFrame;
}
}
};

and the code for the little pictures is:

on(release){
containerMC.loadPic(“latem/fotoalbum/Bosklas/bosklas01.jpg”);
}

Thanks!!

when i click on the picture buttons, they are position wrongly. if you want to counter act this, you just need to reposition the movieclip.

onClipEvent(load) {
    this._x -= this._width/2;
    this._y -= this._height/2;
}

hope this helps

Thanks for replying so fast but I just found out I made a stupid mistake, I uploaded the wrong file time after time. No wonder nothing happend when I looked at the site

Sorry !!

ROTF