whats wrong with this that preloading(tfPercentage)ends up with NaN error
contArr = [
“00.jpg”,
“01.jpg”,
“02.jpg”
];
function preloadClips (nr) {
var cnt = this.createEmptyMovieClip(“container”,10);
cnt._visible = false;
var ch = this.createEmptyMovieClip(“check”,11);
ch.onEnterFrame = function () {
var bl = this._parent.container.getBytesLoaded();
var bt = this._parent.container.getBytesTotal();
this._parent.tfPercentage.text = Math.round((bt/bl)*100);
if (bl/bt==1) {
info= ("loaded " + contArr[nr]);
this.removeMovieClip();
this._parent.tfPercentage.text=0
this._parent.container.removeMovieClip();
if (this.nr<=contArr.length) {
preloadClips(++nr);
this._parent.tfPercentage.text = “100%”;
} else {
return;
}
}
}
cnt.loadMovie(contArr[nr]);
}
preloadClips(0);