# Preloader?

**URL:** <https://forum.kirupa.com/t/preloader/262820>\
**Category:** Uncategorized\
**Created:** [June 10, 2008, 8:58am UTC](https://forum.kirupa.com/t/preloader/262820 "2008-06-10T08:58:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kappa](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Kappa](https://forum.kirupa.com/u/Kappa)\
**Post date:** [June 10, 2008, 8:58am UTC](https://forum.kirupa.com/t/preloader/262820/1 "2008-06-10T08:58:33Z")

</div>

hey. a while back i remember following a preloader tutorial which had a method of

% of frames loaded out of 100 = preloader animation frame

i may be explaining it bad… but for example

1% loaded = play frame 1 of the preloader animation  
2% loaded = play frame 2 of the preloader animation  
3% loaded = play frame 3 of the preloader animation  
4% loaded = play frame 4 of the preloader animation  
etc…  
that way you could have an animation of say, a chicken crossing the road which lasts 100 frames, and it animates according to the % of the entire movie loaded so far

can anyone explain a method for this, or post up a tutorial which uses this way  
thanks in advance

edit:  
nvm didnt look around enough, i think this is similar to what i was after  
[http://www.kirupa.com/developer/actionscript/tween\_as\_preloader.htm](http://www.kirupa.com/developer/actionscript/tween_as_preloader.htm)

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [June 10, 2008, 9:31am UTC](https://forum.kirupa.com/t/preloader/262820/2 "2008-06-10T09:31:18Z")

</div>

this topic comes up alot

preloaders have to be small and simple else you will need a preloader for the preloader

what you are asking is fairly simple

MC.gotoAndStop(% loaded)

---

<div class="post-metadata">

**Author:** ![Kappa](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Kappa](https://forum.kirupa.com/u/Kappa)\
**Post date:** [June 10, 2008, 3:13pm UTC](https://forum.kirupa.com/t/preloader/262820/3 "2008-06-10T15:13:39Z")

</div>

ah, much thanks. so something like this would work

load\_bytes = Math.round(\_root.getBytesLoaded());  
load\_total = Math.round(\_root.getBytesTotal());  
load\_percent = (load\_bytes/load\_total)\*100;

mc.gotoAndStop(load\_percent);

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [June 10, 2008, 3:16pm UTC](https://forum.kirupa.com/t/preloader/262820/4 "2008-06-10T15:16:32Z")

</div>

should do

one problem is that it may skip if it loads quickly

---

<div class="post-metadata">

**Author:** ![Kappa](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Kappa](https://forum.kirupa.com/u/Kappa)\
**Post date:** [June 10, 2008, 3:24pm UTC](https://forum.kirupa.com/t/preloader/262820/5 "2008-06-10T15:24:11Z")

</div>

yeah thats no problem ill put a short transition before and after the preload so its not completely unnoticed. should be loading a 2meg file though (making short-movie for class)

thanks for the help again, night
