Whaaaa resize!

hi,

i’m busy making a gallery (i thought it was finished…) but i have some resizing problems…

okay… here’s the problem… http://thomas.zeal-music.com/flash/ruud.swf
click on the fourth thumbnail, and wait untill you see the big version… (if everything is correct it fits in the box) then click the last thumbnail (note: there’s an arrow that move the row of thumbs). As you see… this one doesn’t fit…

the width of the container (in wich the big one is loaded) is show down in the left corner. here’s the code, i think the resize function is important for this problem…


_root.gedrukt = "img";
_root.finished = 100;
_root.to = 0;
gotoAndPlay(5)
loader._visible = 0;
_root.finished = 100;
_root.voorzetsel = "[http://thomas.zeal-music.com/foto/](http://thomas.zeal-music.com/foto/)";
myid=Math.round(Math.random()*10000);
for (i=0; i<totaal; i++) {
 removeMovieClip(_root*);
}
plek = _root.voorzetsel+"pics.php?dir="+_root.gedrukt+"&bla="+myid;
loadFiles = new LoadVars();
loadFiles.load(plek);
loadFiles.onLoad = function() {
 allemaal = this.totalpics;
 totaal2 = parseInt(allemaal);
 for (i=1; i<totaal2; i++) {
  _root.holder.attachMovie(2, ["foto"+i], i);
  _root.holder["foto"+i]._x = 15+(85*(i-1));
  _root.holder["foto"+i]._y = 0;
 }
 for (i=1; i<totaal2; i++) {
  _root.holder["foto"+i].http = this["file"+i];
  b = this["file"+i];
  var my_array:Array = (b.split("."));
  x = my_array[0];
  _root.holder["foto"+i].disc = this[x+".jpg"];
  _root.holder["foto"+i].origb = this["origb"+i];
  _root.holder["foto"+i].origh = this["origh"+i];
 }
};
function moveit(naar) {
 to = _root.to+naar;
 this.onEnterFrame = function() {
  dx = to-_root.holder._x;
  _root.holder._x += dx/9;
  if (Math.abs(dx)<0.3) {
   delete this.onEnterFrame;
  }
 };
}
function resizepic() {
 _root.xpos = 10;
 _root.ypos = 87;
 container._alpha = 0;
 breedte = container._width;
 hoogte = container._height;
 maxb = 378;
 maxh = 284;
 if (breedte>hoogte) {
  //te breed
  getalb = (maxb/breedte);
  container._width = maxb;
  container._height = getalb*hoogte;
  container._x = _root.xpos+(((maxb)-container._width)/2);
  container._y = _root.ypos+(((maxh)-container._height)/2);
 }
 if (hoogte>=breedte) {
  // te hoog
  getalh = (maxh/container._height);
  container._height = maxh;
  container._width = getalh*breedte;
  container._x = _root.xpos+(((maxb)-container._width)/2);
  container._y = _root.ypos+(((maxh)-container._height)/2);
 }
 test.text = container._width;
 fadein = setInterval(fadeIn, 60);
}
function fadeIn() {
 _root.finished = 0;
 container._alpha += 10;
 if (container._alpha>=95) {
  _root.finished = 100;
  clearInterval(fadein);
 }
}
function fadeOut() {
 _root.finished = 0;
 container._alpha -= 10;
 if (container._alpha<=5) {
  clearInterval(fadeout);
  preload();
 }
}
function preload() {
 container.loadMovie(_root.http);
 ding._visible = true;
 this.onEnterFrame = function() {
  f = container.getBytesTotal();
  g = container.getBytesLoaded();
  percent = Math.round((g/f)*100);
  ding.txt = percent+"%";
  ding.balk.Bar._xscale = percent;
  if (g == f && f>4) {
   resizepic();
   ding._visible = false;
   delete this.onEnterFrame;
  }
 };
}
function changepic() {
 _root.finished = 0;
 dir = foto[current];
 fadeout = setInterval(fadeOut, 60);
}

thanks for reading :smiley: