# Another preloader question

**URL:** <https://forum.kirupa.com/t/another-preloader-question/153050>\
**Category:** Uncategorized\
**Created:** [June 28, 2005, 11:25pm UTC](https://forum.kirupa.com/t/another-preloader-question/153050 "2005-06-28T23:25:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![robvr6](https://avatars.discourse-cdn.com/v4/letter/r/fbc32d/32.png) [@robvr6](https://forum.kirupa.com/u/robvr6)\
**Post date:** [June 28, 2005, 11:25pm UTC](https://forum.kirupa.com/t/another-preloader-question/153050/1 "2005-06-28T23:25:10Z")

</div>

Hi folks,

Waht it is I have been trying for hours trying to figure out how I can add a bar that scales when loading a swf instead of just text that counts up. The fla is from a tutorial from a mag and what I can figure out the as for the loading of files is like this

**in a key frame**  
percentloaded = 0;  
percentage = “”;  
sizetext = “”;  
\_root.shutterOpen=false;  
loadtarget=\_root.content;  
loadMovie(\_root.newContent,loadtarget);  
totalbytes = -1;

**next keyframe**  
if (loadtarget.getBytesTotal() == totalbytes) {  
percentloaded = Math.floor(loadtarget.getBytesLoaded()/totalbytes\*100);  
percentage = percentloaded + “/100”;  
if (percentloaded == 100){  
gotoAndPlay(\_currentframe+2);  
}  
}  
totalbytes = loadtarget.getBytesTotal();  
filesize=Math.floor(totalbytes/1000);  
if(filesize\>=0)sizetext=filesize+“K”;

**next keyframe**  
gotoAndPlay(\_currentframe-1);

thanks  
R
