# \[MX\] control the width of preloding bar

**URL:** <https://forum.kirupa.com/t/mx-control-the-width-of-preloding-bar/42504>\
**Category:** flash\
**Created:** [February 9, 2004, 11:44pm UTC](https://forum.kirupa.com/t/mx-control-the-width-of-preloding-bar/42504 "2004-02-09T23:44:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![DizainLand](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@DizainLand](https://forum.kirupa.com/u/DizainLand)\
**Post date:** [February 9, 2004, 11:44pm UTC](https://forum.kirupa.com/t/mx-control-the-width-of-preloding-bar/42504/1 "2004-02-09T23:44:04Z")

</div>

Hi every one 🙂

I asked a week ago if i can add a  
preloader bar to the transition  
in the tutorial (Preloader and Transition  
for Dynamic Files) and we did it with Claduio’s  
help :).  
when i made it i came with idea that require  
me to adjast the width of the bar to a specific  
points, please open the picture to see the situatuin

thanks in advance

---

<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:** [February 10, 2004, 12:05am UTC](https://forum.kirupa.com/t/mx-control-the-width-of-preloding-bar/42504/2 "2004-02-10T00:05:55Z")

</div>

whats the code on the mc???

---

<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:** [February 10, 2004, 12:16am UTC](https://forum.kirupa.com/t/mx-control-the-width-of-preloding-bar/42504/3 "2004-02-10T00:16:21Z")

</div>

the code is

[AS]onClipEvent (load) {  
this.\_width = 0;  
}[/AS]

---

<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:** [February 10, 2004, 2:16am UTC](https://forum.kirupa.com/t/mx-control-the-width-of-preloding-bar/42504/4 "2004-02-10T02:16:51Z")

</div>

Hi again 🙂  
this is the Fla and one swf file, the photo button only play 🙂

---

<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:** [February 11, 2004, 8:36pm UTC](https://forum.kirupa.com/t/mx-control-the-width-of-preloding-bar/42504/5 "2004-02-11T20:36:56Z")

</div>

any one help, please  
i need it urgently 🙂

---

<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:** [February 11, 2004, 9:51pm UTC](https://forum.kirupa.com/t/mx-control-the-width-of-preloding-bar/42504/6 "2004-02-11T21:51:02Z")

</div>

can you just post your actionscript here, i know exactly whats wrong but i need to see what values you have in your actionscript.

you probably have something that looks kinda like this :

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

so what you probably need to do is adjust the # value in the  
"this.loadBar.\_width = getPercent\*100;"  
sections of your script.

…see if that helps.

---

<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:** [February 13, 2004, 10:54pm UTC](https://forum.kirupa.com/t/mx-control-the-width-of-preloding-bar/42504/7 "2004-02-13T22:54:32Z")

</div>

The code is inside the Fla, please open it and see what is the problem

---

<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:** [February 14, 2004, 2:09am UTC](https://forum.kirupa.com/t/mx-control-the-width-of-preloding-bar/42504/8 "2004-02-14T02:09:11Z")

</div>

Ok, this is a **_very very_** messy file to do something so simple… a lot of this is not needed - its just a lot more confusing than it needs to be.

u can do this in a million ways.

1 problem u have is that your loading bar graphic is bigger than it needs to be… and that is gonna cause u problems.

I was inclined to tidy your code up a bit, but I couldn’t be botherred, so I have just alterred it slightly & fixed it instead.

Its attached.

You can see it here - [http://www.Innovati0n.com/tester2](http://www.Innovati0n.com/tester2)

---

<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:** [February 14, 2004, 2:19am UTC](https://forum.kirupa.com/t/mx-control-the-width-of-preloding-bar/42504/9 "2004-02-14T02:19:37Z")

</div>

Thanks alot for your help, i will try to play with it 🙂

thank u again 🙂
