# Sequenced Preloader Questions

**URL:** https://forum.kirupa.com/t/sequenced-preloader-questions/29137
**Category:** flash
**Created:** [August 22, 2003, 7:17pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137 "2003-08-22T19:17:48Z")
**Posts on this page:** 14
**Page:** 1

<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: [August 22, 2003, 7:17pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/1 "2003-08-22T19:17:48Z")

</div>

I am somewhat new to Flash. I used the preloader located here:

[http://www.kirupa.com/developer/mx/percentage\_loader.htm](http://www.kirupa.com/developer/mx/percentage_loader.htm)

I created a small animation on a new layer that loops as the preloader is working. Is there a way to have this animation be in sequence with the Preloader bar?

For example… as the percent loaded equals 33%, the animation would jump to specific point… As the Proloader loaded 66% the animation would jump to a second point. etc.

Did that make sense? Any ideas?

thanks  
-ROB

---

<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: [August 22, 2003, 7:50pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/2 "2003-08-22T19:50:13Z")

</div>

Use this preloader: [http://www.kirupa.com/developer/mx/percentagepreloader.htm](http://www.kirupa.com/developer/mx/percentagepreloader.htm). Then modify the code like this:

[AS]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(getPercent_100 \<= 33){  
Actions for if the preloader less or equal than 33  
}  
if(getPercent_100 \<= 66){  
Actions for if the preloader less or equal than 66  
}  
if (bytes\_loaded == bytes\_total) {  
this.gotoAndPlay(3);  
}[/AS]

By the way, search the forum, I’ve already answered this question before.

---

<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: [August 22, 2003, 7:56pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/3 "2003-08-22T19:56:10Z")

</div>

I would use this tutorial for what you are trying to do:  
[http://www.kirupa.com/developer/mx/percentagepreloader.htm](http://www.kirupa.com/developer/mx/percentagepreloader.htm)

This way, you are dealing with code instead of a FMX component. This preloader works within the first two frames of the movie that loops until the movie’s loaded. Beacuse of this, your animation would have to be in another movieClip. Once you make that movieClip, give it the instance name of ‘foo’. Then you can make actions like this (for instance) :

```auto

if ((getPercent*100)>33){
_root.foo.gotoAndStop("partNumberOne");
}
if ((getPercent*100>66){
_root.foo.gotoAndStop("partNumberTwo");
}
//...etc...etc...

```

‘partNumberOne’ and ‘partNumberTwo’ would be either the frame names or numbers in foo that you would want to go to.

Hope 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: [August 22, 2003, 7:56pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/4 "2003-08-22T19:56:51Z")

</div>

I gotta learn how to type faster!! 😛

---

<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: [August 22, 2003, 9:17pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/5 "2003-08-22T21:17:24Z")

</div>

awesome. I will try that!

---

<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: [August 23, 2003, 6:59pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/6 "2003-08-23T18:59:26Z")

</div>

I am having trouble still. Here is the code I used for the preloader:

bytes\_loaded = Math.round(\_root.getBytesLoaded());  
bytes\_total = Math.round(\_root.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
\_root.loadBar.\_width = getPercent_200;  
\_root.loadText = Math.round(getPercent_100)+"%";

if ((getPercent\*100)\>33) {  
\_root.foo.gotoAndStop (“PartNumberOne”);  
}

if ((getPercent\*100)\>66) {  
\_root.foo.gotoAndStop (“PartNumberTwo”);  
}

if (bytes\_loaded == bytes\_total) {  
\_root.gotoAndStop(3);  
}

The animation just loops. The preloader stops working too. What am I doing wrong?

---

<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: [August 23, 2003, 7:01pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/7 "2003-08-23T19:01:09Z")

</div>

Ok I got the preloader to work now… But my animation is still looping.

---

<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: [August 23, 2003, 7:01pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/8 "2003-08-23T19:01:35Z")

</div>

Can we see the FLA ?

---

<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: [August 23, 2003, 7:17pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/9 "2003-08-23T19:17:08Z")

</div>

here is the site:  
[http://www.furraro.com/test.html](http://www.furraro.com/test.html)

The actual FLA file is at  
[http://www.furraro.com/Main.fla](http://www.furraro.com/Main.fla)

---

<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: [August 23, 2003, 7:21pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/10 "2003-08-23T19:21:43Z")

</div>

“Failed to open document” :-\

---

<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: [August 23, 2003, 7:51pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/11 "2003-08-23T19:51:53Z")

</div>

Voetsjoeba si there another way I can send you the file. It doesnt seem to be working right on my server…

---

<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: [August 23, 2003, 8:00pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/12 "2003-08-23T20:00:45Z")

</div>

Does this 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: [August 23, 2003, 8:05pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/13 "2003-08-23T20:05:29Z")

</div>

Claudio -

That is pretty much what I was looking for. Thanks a lot!!!

But one more thing… Is it possible to have each of those battery levels be animated. Let’s say that they are rotating or changing colors…

---

<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: [August 23, 2003, 8:10pm UTC](https://forum.kirupa.com/t/sequenced-preloader-questions/29137/14 "2003-08-23T20:10:04Z")

</div>

Yes, you can use each battery level a movie clip (then animate it)
