# Integrated preloader issue

**URL:** <https://forum.kirupa.com/t/integrated-preloader-issue/57188>\
**Category:** Uncategorized\
**Created:** [July 11, 2004, 4:58am UTC](https://forum.kirupa.com/t/integrated-preloader-issue/57188 "2004-07-11T04:58:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbeas](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@dbeas](https://forum.kirupa.com/u/dbeas)\
**Post date:** [July 11, 2004, 4:58am UTC](https://forum.kirupa.com/t/integrated-preloader-issue/57188/1 "2004-07-11T04:58:29Z")

</div>

Does ANYONE know of a good book or tutorial that talks about preloaders in depth, or could shed some light on the issue. I think it’s one of the most important things in Flash, yet everything on the web seems to only discuss parts of different ways to do it. I think a beautiful example of a great preloader is [http://www.24-7media.de/BWS](http://www.24-7media.de/BWS). It seems as though it’s integrated in the main swf, It’s always in the same spot, always the same preloader. As opposed to the way I have done it [http://www.versing.com](http://www.versing.com) …apreloader for every movie I call that shows in the movie to be called. I feel like there has to be a better way to do this. A way that would work like : [http://www.24-7media.de/BWS/](http://www.24-7media.de/BWS/)

Thanks for any 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:** [July 11, 2004, 8:46am UTC](https://forum.kirupa.com/t/integrated-preloader-issue/57188/2 "2004-07-11T08:46:23Z")

</div>

> [@dbeas](#):
>
> Does ANYONE know of a good book or tutorial that talks about preloaders in depth, or could shed some light on the issue. I think it’s one of the most important things in Flash, yet everything on the web seems to only discuss parts of different ways to do it. I think a beautiful example of a great preloader is [http://www.24-7media.de/BWS](http://www.24-7media.de/BWS). It seems as though it’s integrated in the main swf, It’s always in the same spot, always the same preloader. As opposed to the way I have done it [http://www.versing.com](http://www.versing.com) …apreloader for every movie I call that shows in the movie to be called. I feel like there has to be a better way to do this. A way that would work like : [http://www.24-7media.de/BWS/](http://www.24-7media.de/BWS/)
> 
> Thanks for any help!

All you need to do is set up a function which accepts arguements like this  
first frame of the main timeline.  
stop();  
assessLoad = function (clip) {  
var kbLoaded = Math.floor(clip.getBytesLoaded()/1024);  
var kbTotal = Math.floor(clip.getBytesTotal()/1024);  
percent = kbLoaded/kbTotal;  
//your animation movement code here  
percent\_txt.text = Math.floor(percent\*100)+“%”;  
if ((kbLoaded == kbTotal) && kbTotal\>1) {  
// dowhatever-maybe animation.gotoAndStop(1) ,animation.\_visible = false

```
                        percent_txt.text=""; 
	clearInterval(myInterval);
}

```

};  
//so for the main movie you would use  
myInterval = setInterval(assessload, 50, this);

if you want something loading into a container mc  
myButton.onPress = function(){  
//maybe animation.\_visible =true etc  
myInterval = setInterval(assessload, 50,myContainer);  
}  
or into a level  
myButton2.onPress = function(){  
myInterval = setInterval(assessload, 50,mylevel);  
}  
The best book i have seen on the subject is FlashMx Application &Design-Friends of Ed.

---

<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:** [July 11, 2004, 11:58am UTC](https://forum.kirupa.com/t/integrated-preloader-issue/57188/3 "2004-07-11T11:58:39Z")

</div>

Thanks, I’ll play around with this!
