# Bar loaders? HOW do u make them

**URL:** <https://forum.kirupa.com/t/bar-loaders-how-do-u-make-them/1001>\
**Category:** Uncategorized\
**Created:** [August 6, 2002, 1:13am UTC](https://forum.kirupa.com/t/bar-loaders-how-do-u-make-them/1001 "2002-08-06T01:13:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![orangeptrinh](https://avatars.discourse-cdn.com/v4/letter/o/ecc23a/32.png) [@orangeptrinh](https://forum.kirupa.com/u/orangeptrinh)\
**Post date:** [August 6, 2002, 1:13am UTC](https://forum.kirupa.com/t/bar-loaders-how-do-u-make-them/1001/1 "2002-08-06T01:13:06Z")

</div>

hey …can u guys help me on how to make a bar loader …  
the steps and coding…thanks a lot…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 6, 2002, 1:58am UTC](https://forum.kirupa.com/t/bar-loaders-how-do-u-make-them/1001/2 "2002-08-06T01:58:57Z")

</div>

This code should work fine, make an empty movieclip and attach this code to it.

onClipEvent(enterFrame){  
if(\_root.getBytesLoaded () \> 0 && \_root.getBytesLoaded() == \_root.getBytesTotal() )  
\_root.gotoAndPlay(“beginMovie”);  
}else{  
loaded = \_root.getBytesLoaded();  
total = \_root.getBytesTotal();  
percent = int(loaded/total \* 100)  
//Scales the bar to percent, which has to have getBytesLoaded()  
bar.\_xscale = percent;  
}  
}  
Post again if you need help.

Good Luck

Kyle  
🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 6, 2002, 3:58am UTC](https://forum.kirupa.com/t/bar-loaders-how-do-u-make-them/1001/3 "2002-08-06T03:58:11Z")

</div>

i get this error when i insert that code

Scene=Scene 1, Layer=loader, Frame=1: Line 4: ‘else’ encountered without matching ‘if’  
}else{

and you had an extra } at the bottom of the code :o)

how do i fix the if error?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 6, 2002, 8:41am UTC](https://forum.kirupa.com/t/bar-loaders-how-do-u-make-them/1001/4 "2002-08-06T08:41:41Z")

</div>

right seen as im pretty sick of loader questions i kinda know it  
ucn get a component from [http://www.flashcomponents.net](http://www.flashcomponents.net) called loader install it create a new movie import ur movie to the libary drag ur movie over 1 frame create a new layer called preloader in th first frame of preloader add the loader by draging it on to the stage press ctrl+enter twice to view it

-Tom
