# Problem with my photo gallery

**URL:** <https://forum.kirupa.com/t/problem-with-my-photo-gallery/175964>\
**Category:** Uncategorized\
**Created:** [January 19, 2006, 6:02am UTC](https://forum.kirupa.com/t/problem-with-my-photo-gallery/175964 "2006-01-19T06:02:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krogan\_McKruthe](https://avatars.discourse-cdn.com/v4/letter/k/779978/32.png) [@Krogan\_McKruthe](https://forum.kirupa.com/u/Krogan_McKruthe)\
**Post date:** [January 19, 2006, 6:02am UTC](https://forum.kirupa.com/t/problem-with-my-photo-gallery/175964/1 "2006-01-19T06:02:22Z")

</div>

hi, me once again…i don’t understand why this keeps happening to my gallery…i have the infinite menu and the auto resize and it craps out sometimes…i can look at some of the images fine, and then all of the sudden i click on an image and id doesn’t resize, it only displays as if the resize square was the instance in which it loads to…it’s weird…heres the site…and the actionscript for the resize part… [Gallery](http://msfrealty.com/mike/punchy/) just click on the gallery part…  
and here’s the action script:

> spacing = 10;  
> containerMC.\_alpha = 0;

MovieClip.prototype.loadPic = function(pic){  
\_root.display.containerMC.\_alpha = 0;  
this.loadMovie(pic);  
\_root.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 \_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.display.containerMC.\_x = this.\_x-this.\_width/2+spacing/2;  
\_root.display.containerMC.\_y = this.\_y-this.\_height/2+spacing/2;  
\_root.display.containerMC.\_alpha += 15;  
if (\_root.display.containerMC.\_alpha\>90) {  
\_root.display.containerMC.\_alpha = 100;  
delete this.onEnterFrame;  
}  
}  
};  
};
