# bytesTotal Problem

**URL:** <https://forum.kirupa.com/t/bytestotal-problem/243231>\
**Category:** flash\
**Created:** [November 4, 2007, 8:54pm UTC](https://forum.kirupa.com/t/bytestotal-problem/243231 "2007-11-04T20:54:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gazurt](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gazurt/32/4060_2.png) [@Gazurt](https://forum.kirupa.com/u/Gazurt)\
**Post date:** [November 4, 2007, 8:54pm UTC](https://forum.kirupa.com/t/bytestotal-problem/243231/1 "2007-11-04T20:54:12Z")

</div>

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:

```auto
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?
