# NaN

**URL:** <https://forum.kirupa.com/t/nan/214905>\
**Category:** flash\
**Created:** [February 1, 2007, 9:32pm UTC](https://forum.kirupa.com/t/nan/214905 "2007-02-01T21:32:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jju](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@jju](https://forum.kirupa.com/u/jju)\
**Post date:** [February 1, 2007, 9:32pm UTC](https://forum.kirupa.com/t/nan/214905/1 "2007-02-01T21:32:13Z")

</div>

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);
