# How Do You Fetch the Total Bytes of a File Before Loading It?

**URL:** <https://forum.kirupa.com/t/how-do-you-fetch-the-total-bytes-of-a-file-before-loading-it/267417>\
**Category:** flash\
**Created:** [July 31, 2008, 8:19pm UTC](https://forum.kirupa.com/t/how-do-you-fetch-the-total-bytes-of-a-file-before-loading-it/267417 "2008-07-31T20:19:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MoOMoOMiLK](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@MoOMoOMiLK](https://forum.kirupa.com/u/MoOMoOMiLK)\
**Post date:** [July 31, 2008, 8:19pm UTC](https://forum.kirupa.com/t/how-do-you-fetch-the-total-bytes-of-a-file-before-loading-it/267417/1 "2008-07-31T20:19:55Z")

</div>

I am just wondering how I can find out the size of a file before loading it in AS3. The property bytesTotal only works after you start loading the file. What I am trying to do here is to load a sequence of files one by one showing only one preloader which takes the percentage of bytes loaded over the total bytes of all the files.

Thanks in advance.
