Resizing gallery issue

hey guys, could you all check out www.creativejuggernauts.com
and go to the print section and then check out the print pieces. for some reason my resizing gallery movie is doing some weird stuff and i cant figure out how to fix it. my actionscript goes like this :

stop();

spacing = 20;
galleryMC._alpha = 0;

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

anyone? can anyone help me with this?

What’s the “emptyMC”?
If you load your pictures in “galleryMC”, this code will work, replace “containerMC” with “galleryMC”:wink:

spacing = 10;
containerMC._alpha = 0;
MovieClip.prototype.loadPic = function(pic) {
        _root.containerMC._alpha = 0;
        this.loadMovie(pic);
        this._parent.onEnterFrame = function() {
                var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
                //added checking for width and height 
                if (t != 0 && Math.round(l/t) == 1 && containerMC._width>0 && containerMC._height>0) {
                        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;
                //added height here in case only the height differs
                if (Math.abs(this._width-w)<1 && Math.abs(this.height-h)<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 += 5;
                        if (_root.containerMC._alpha>90) {
                                _root.containerMC._alpha = 100;
                                delete this.onEnterFrame;
                        } 
				}
		}
}

scotty(-:

hey scotty, thanks, i tried your code out but in the end i figured out what my problem was…as always, paths…i appreciate your assistance.

no problem:)
Glad you’ve found it out!

scotty(-: