# Progress indicator

**URL:** <https://forum.kirupa.com/t/progress-indicator/9605>\
**Category:** flash\
**Created:** [December 15, 2002, 12:48am UTC](https://forum.kirupa.com/t/progress-indicator/9605 "2002-12-15T00:48:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheMechanist](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/themechanist/32/123_2.png) [@TheMechanist](https://forum.kirupa.com/u/TheMechanist)\
**Post date:** [December 15, 2002, 12:48am UTC](https://forum.kirupa.com/t/progress-indicator/9605/1 "2002-12-15T00:48:26Z")

</div>

Ok, I am building a preloader for my full flash site. I don’t want to put the standard “growbar” progress indicator… you have to be original 😉

so I would like to build something based on what I saw on [Http://www.highctr.com](Http://www.highctr.com)

They have lights that come on one by one until the movie is fully loaded…very cool and not boring !

Can anybody tell me what the actionScript would look like for this ?

Thanks!

---

<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:** [December 15, 2002, 1:05am UTC](https://forum.kirupa.com/t/progress-indicator/9605/2 "2002-12-15T01:05:22Z")

</div>

This is for a loader that has your “lights” animation on stage with an instance name of “lights” and within that MC there are four lables (for the four different lights lighting up in sequence) called lightOne, lightTwo, lightThree, lightFour… this is just one basic way of doing it… hope it helps you out:

```php

totalBytes = _root.getBytesTotal();
loadedBytes = _root.getBytesLoaded();
percentDone = int((loadedBytes/totalBytes)*100);
if (percentDone = 25) {
	lights.gotoAndPlay("lightOne");
}
if (percentDone = 50) {
	lights.gotoAndPlay("lightTwo");
}
if (percentDone = 75) {
	lights.gotoAndPlay("lightThree");
}
if (percentDone = 100) {
	lights.gotoAndPlay("lightFour");
}

```

---

<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:** [December 15, 2002, 1:06am UTC](https://forum.kirupa.com/t/progress-indicator/9605/3 "2002-12-15T01:06:44Z")

</div>

Also you have to put a second frame after the one I showed that sends it back to the first (to keep executing the code) until everything is loaded.

Peace
