# Full width progress bar

**URL:** <https://forum.kirupa.com/t/full-width-progress-bar/239374>\
**Category:** Uncategorized\
**Created:** [September 21, 2007, 12:46am UTC](https://forum.kirupa.com/t/full-width-progress-bar/239374 "2007-09-21T00:46:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [September 21, 2007, 12:46am UTC](https://forum.kirupa.com/t/full-width-progress-bar/239374/1 "2007-09-21T00:46:22Z")

</div>

I have a full screen flash movie and I made a progress bar that I would like to have equal to whatever the width of the stage is at that time. The code I am using right now is

```php

loadBar.onEnterFrame = function() {
    var amount = Math.floor(((getBytesLoaded()/getBytesTotal())*100));
    loadBar._width = amount;
    percent.text = amount+"%";
    if (amount>=100) {
        delete loadBar.onEnterFrame;
        gotoAndPlay(3);
    }
};

```

Although this code does work, its really setting the bar equal to that in pixels. I need it more along the lines of say if it was at 10%…rather it being 10 pixels, I need it to be 10% of the Stage.width. Any idea on how to do this? Thanks.
