# Masked loading bar

**URL:** <https://forum.kirupa.com/t/masked-loading-bar/186399>\
**Category:** flash\
**Created:** [April 21, 2006, 12:53am UTC](https://forum.kirupa.com/t/masked-loading-bar/186399 "2006-04-21T00:53:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![llDemonll](https://avatars.discourse-cdn.com/v4/letter/l/a9adbd/32.png) [@llDemonll](https://forum.kirupa.com/u/llDemonll)\
**Post date:** [April 21, 2006, 12:53am UTC](https://forum.kirupa.com/t/masked-loading-bar/186399/1 "2006-04-21T00:53:42Z")

</div>

ok i’ve looked all overthe internet, and have played around a bit, but whenever i try to mask a loading bar (i.e. a picture is revealed as the loading bar progresses) i confuse myself.

any help as to how this can be accomplished / link to a tutorial that tells me how to do this would be appreciated =)

thanks!

---

<div class="post-metadata">

**Author:** ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)\
**Post date:** [April 21, 2006, 1:35am UTC](https://forum.kirupa.com/t/masked-loading-bar/186399/2 "2006-04-21T01:35:23Z")

</div>

ok - just use the standard loader function

```auto

barlevel = Math.floor((getBytesLoaded()/getBytesTotal())*100);

```

then make a movie clip called “bar” and in it put 100 Frames of animation of the mask revealing the image, from frame 1 with no image, to frame 100 with all of it showing. put a stop(); action in its first frame

then back in the main loader code, just put

```auto

if(barlevel > 0){
_root.bar.gotoAndStop(barlevel);
} else {
_root.bar.gotoAndStop(1);
}

```
