Dynamic preloader not working

Hi all,

i have a dynamic preloader i’m working at that seem to give me problem, here the coding


loadPage(section,1,10);
//
function loadPage(sectionID, startID, endID) {
	for (i=startID; i<=endID; i++) {
		loadMovie(path+section+"/tn/"+this["myName"+(i-1)], _root["tn"+i].holder);
		//loadTn(_root["tn"+i]._x,_root["tn"+i]._y,i);
		//
		// create preloader
		attachMovie("preloaderSm","preloaderSm"+i,1000001+i);
		this["preloaderSm"+i]._x = _root["tn"+i]._x+32;
		this["preloaderSm"+i]._y = _root["tn"+i]._y+32;
		// run preloader
		this["preloaderSm"+i].createEmptyMovieClip("runLoader",2000001);
		this["preloaderSm"+i].runLoader.onEnterFrame = function() {
			var loadedBB = _root["tn"+i].holder.getBytesLoaded();
			var totalBB = _root["tn"+i].holder.getBytesTotal();
			trace("load "+loadedBB);
			this._parent._parent.preloaderSm.xbar._xscale = 0;
			//
			if (loadedBB>30) {
				preload = (loadedBB/totalBB)*100;
				this._parent._parent.preloaderSm.percentDisplay.text = Math.ceil(preload)+"%";
				this._parent._parent.preloaderSm.xbar._xscale = Math.ceil(preload);
				if (preload>=100) {
					//fade in contents
					_root["tn"+i].holder._alpha = false;
					var tnAlphaIn:Tween = new Tween(_root["tn"+i].holder, "_alpha", Strong.easeOut, 0, 100, 1, true);
					//
					// unload preloader script and mc
					this.unloadMovie();
					this._parent._parent.preloaderSm.unloadMovie();
				}
			} else {
				preload = 0;
			}
		};
	}
}

i think on this following line is not working, because when i trace the value, it only give “4”


var loadedBB = _root["tn"+i].holder.getBytesLoaded();

btw, the images is loading, the problem seem to lies on the preloader only, any insight please?