Preloader returns infinity

My preload have a problem?

i can test in flash and load complete 100% but in my website can’t load

and return infinity %

this is my code


stop();

this.addEventListener(Event.ENTER_FRAME, loading);

function loading(e:Event):void{

var total:Number = this.stage.loaderInfo.bytesTotal;
var loaded:Number = this.stage.loaderInfo.bytesLoaded;

bar_mc.scaleX = loaded/total;
loader_txt.text = Math.floor((loaded/total)*100)+ "%";

if (total == loaded){
play();
this.removeEventListener(Event.ENTER_FRAME, loading);
}

}

please help and thanks all people for help