[preloader] error dont know how to

i;ve made this preloader:

www.bartvanderplas.nl/primitive

but there is an error in the if / else section and i dont know what it is…
it looping the if somehow cause the output continious saying
100%
100%
100%
…etc.

does anyone know that is possible ?

code:
onEnterFrame = function(){
//var
var percent:Number = Math.floor(_root.getBytesLoaded() / _root.getBytesTotal()*100);

if (percent == 100){
    trace("100%");
}else{
    // ..
}

}
onEnterFrame();