# Preloader Array Newbie

**URL:** https://forum.kirupa.com/t/preloader-array-newbie/102351
**Category:** Uncategorized
**Created:** [February 22, 2004, 10:25pm UTC](https://forum.kirupa.com/t/preloader-array-newbie/102351 "2004-02-22T22:25:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![rapo](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@rapo](https://forum.kirupa.com/u/rapo)
#### Post date: [February 22, 2004, 10:25pm UTC](https://forum.kirupa.com/t/preloader-array-newbie/102351/1 "2004-02-22T22:25:32Z")

</div>

I’m trying to get a preloader to work with multiple swf and have found [this one](http://www.bokelberg.de/actionscript/3.html) seems to work but I need to work out how to delay the start of the second, third etc. I thought maybe adding a visible = false type script to the array may work??? HELP

---

<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 22, 2004, 11:32pm UTC](https://forum.kirupa.com/t/preloader-array-newbie/102351/2 "2004-02-22T23:32:48Z")

</div>

your description is _a bit_ unclear

please post some code/fla and descripbe exactly what the problem is.

---

<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 22, 2004, 11:38pm UTC](https://forum.kirupa.com/t/preloader-array-newbie/102351/3 "2004-02-22T23:38:34Z")

</div>

if you have a look at the above link that is the code I’ve used. What this code does is preload and load all the levels at once I’m hoping to stagger the loading of the indivdual swf’s

---

<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 22, 2004, 11:46pm UTC](https://forum.kirupa.com/t/preloader-array-newbie/102351/4 "2004-02-22T23:46:51Z")

</div>

maybe this works:

[AS]  
// add this to frame 2  
clearInterval(“loadNext”);

frame 4:  
//get the actual loaded bytes  
actBytes = eval("\_level" add movielevel).getBytesLoaded() || 0;  
// get the total bytes to load  
totBytes = eval("\_level" add movielevel).getBytesTotal() || 100;  
// calculate the percentage loaded  
percent = Math.round(actBytes \* 100 / totBytes);

if( totBytes - actBytes \> 10){//more bytes available, keep on loading  
gotoAndPlay(3);  
} else if(actMovieIdx \< moviearray.length){//if we got more movies to load   
/// replace 2000 with the number of ms you want to delay the loading of the next movie  
loadNext = setInterval(gotoAndPlay(2), 2000);   
} // else go to frame 5

//add this to frame 5  
clearInterval(“loadNext”);  
[/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 22, 2004, 11:54pm UTC](https://forum.kirupa.com/t/preloader-array-newbie/102351/5 "2004-02-22T23:54:33Z")

</div>

what about if I add a stop() to frame 1 of each of the movies and stop()  
gotoAndPlay(\_root.imag.loadMovie(“adimg10.swf”,(2)));  
where adimg10.swf is the next movie to the last frame

---

<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 23, 2004, 12:11am UTC](https://forum.kirupa.com/t/preloader-array-newbie/102351/6 "2004-02-23T00:11:34Z")

</div>

my solution doesn’t seem to work but I’m worried about using a time based code. If i use attachMovie to daisy chain the movies together and then have a regular preloader will this take into account the daisy chained movies.
