Why does this preloader not work?

_root.stop();

this.onEnterFrame = function() {

bar_mc._width = int(_root.getBytesLoaded()/_root.getBytesTotal()*100)*2;
percent_txt.text = int(_root.getBytesLoaded()/_root.getBytesTotal()*100);

percent_txt._x = int(bar_mc._width);

if (_root.getBytesLoaded() == _root.getBytesTotal()) {

    doClose();

    
}

};

function doClose(){

    bar_mc.scaleTo(1,1,"easeOutElastic");
    
        bar_mc.onTweenComplete = function() {
        //bar_mc.gotoAndPlay(2);
    
    _root.nextFrame();
    };

}

I want it to execute the doClose function…it doesn’t, however if I add the code without onTweenComplete it works fine…any ideas?