Why loaderInfo.bytesTotal
is Zero when run on server but run Test Movie it isn't zero?
My action(Preload)
stop();
addEventListener(Event.ENTER_FRAME,loaderF);
function loaderF(e:Event):void{
var toLoad:Number = loaderInfo.bytesTotal;
var loaded:Number = loaderInfo.bytesLoaded;
var total:Number = loaded/toLoad;
if(loaded == toLoad){
removeEventListener(Event.ENTER_FRAME,loaderF);
gotoAndStop(2);
}
else{
preloader_mc.preloaderFill_mc.scaleX = total;
preloader_mc.precent_txt.text = Math.floor(total*100)+" %";
preloader_mc.loaded_txt.text = loaded+" Bytes / "+toLoad+" Bytes";
}
}