Help says:
URLlLoader.bytesTotal:
Indicates the total number of bytes in the downloaded data. This property contains 0 while the load operation is in progress and is populated when the operation is complete.
I want to see the totalByte before loading.So I can do a progress bar.But for it I must get the totalByte.
When I tried this:
var xmlLoader:URLLoader;
xmlLoader = new URLLoader(new URLRequest("http://blogaz.flasherblog.com/icerik.php?kategori=tum&r="+Math.floor(Math.random()*50000)));
xmlLoader.addEventListener(ProgressEvent.PROGRESS, init_progress);
function init_progress(event:ProgressEvent) {
trace(xmlLoader.bytesLoaded/xmlLoader.bytesTotal*100);
}
It gives I “Infinity”.Because xmlLoader.bytesTotal is null.So how can I get the totalbytes before loading?