# Preloader code

**URL:** https://forum.kirupa.com/t/preloader-code/164212
**Category:** flash
**Created:** [September 29, 2005, 10:22am UTC](https://forum.kirupa.com/t/preloader-code/164212 "2005-09-29T10:22:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![derrida](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@derrida](https://forum.kirupa.com/u/derrida)
#### Post date: [September 29, 2005, 10:22am UTC](https://forum.kirupa.com/t/preloader-code/164212/1 "2005-09-29T10:22:37Z")

</div>

preloader code

* * *

hi  
i made my first preloader and i have problems.  
i added a scene to my site and buit there the preloader. i have 3 layers: animation of lines, text and actions. all layers has 100 frames.  
in the actions layers at frame 100 i have a stop ();, and then this code:  
if (getBytesLoaded()\>=getBytesTotal()){  
gotoandplay(“secondsite”,1);  
}else{  
gotoandplay(1);  
}

“secondsite” is the name of my site itself.  
now the preloader works since i hear the “secondsite”, but i still see the preloader continue again and again.

where do i got it wrong?

derrida
