The preloader does work but the bar doesn’t work when the first image is loaded.
here is the code and a link to the gallery
MovieClip.prototype.loadPic = function(pic, id) {
info.text = "";
this._alpha = 0;
this.loadMovie(pic);
temp = this._parent.createEmptyMovieClip("temp2", 998);
temp.onEnterFrame = function() {
var total = _root.containerMC.getBytesTotal();
var loaded = _root.containerMC.getBytesLoaded();
bar._visible = true;
per = Math.round((loaded/total)*100);
if (total != 0 && Math.round(loaded/total) == 1 && _root.containerMC._width != 0 && _root.containerMC._height != 0) {
var w = _root.containerMC._width+spacing, h = _root.containerMC._height+spacing;
_root.border.resizeMe(w,h,id);
_root.bar._visible = false;
_root.loadText._visible = false;
delete this.onEnterFrame;
} else {
_root.bar._width = per;
_root.loadText.text = per;
}
};
};