# 4 part preloader - 25% each

**URL:** <https://forum.kirupa.com/t/4-part-preloader-25-each/59130>\
**Category:** flash\
**Created:** [July 28, 2004, 5:18pm UTC](https://forum.kirupa.com/t/4-part-preloader-25-each/59130 "2004-07-28T17:18:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Insomniac](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@Insomniac](https://forum.kirupa.com/u/Insomniac)\
**Post date:** [July 28, 2004, 5:18pm UTC](https://forum.kirupa.com/t/4-part-preloader-25-each/59130/1 "2004-07-28T17:18:09Z")

</div>

This has probably been asked before but I couldn’t find the answer: I am trying to have a preloader bar that works in four separate bits, such that the first bar shows the first 25% loading, the second bar shows 25%-50%… its probably not that hard to do, but I’m having trouble thinking through this logically. So, for one preloader:

bytes\_loaded = Math.round(this.getBytesLoaded());  
bytes\_total = Math.round(this.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
this.loadBar.\_width = getPercent_115;  
this.loadText = Math.round(getPercent_100);  
if (bytes\_loaded == bytes\_total) {  
this.gotoAndPlay(67);  
}

Btw, there is only one text output, so you can ignore the loadText bit. Am kinda mind boggled, so any help will be lapped up 😉

Cheers - Insomniac
