# Loading bar for resizable border photo gallery

**URL:** https://forum.kirupa.com/t/loading-bar-for-resizable-border-photo-gallery/107225
**Category:** Uncategorized
**Created:** [April 13, 2004, 2:14pm UTC](https://forum.kirupa.com/t/loading-bar-for-resizable-border-photo-gallery/107225 "2004-04-13T14:14:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ter](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@ter](https://forum.kirupa.com/u/ter)
#### Post date: [April 13, 2004, 2:14pm UTC](https://forum.kirupa.com/t/loading-bar-for-resizable-border-photo-gallery/107225/1 "2004-04-13T14:14:22Z")

</div>

Does anyone know how to make a loading bar for the resizable border photo gallery? Here is the script I am working with for the resizable border photo gallery…

```auto
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){
			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 += 9;
if (_root.containerMC._alpha>90) {
_root.containerMC._alpha = 100;
delete this.onEnterFrame;
}
}
};
};

```

Thanks all!  
ter
