# Simple preloader help

**URL:** https://forum.kirupa.com/t/simple-preloader-help/258983
**Category:** flash
**Created:** [April 30, 2008, 1:56am UTC](https://forum.kirupa.com/t/simple-preloader-help/258983 "2008-04-30T01:56:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![wlw](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wlw/32/3745_2.png) [@wlw](https://forum.kirupa.com/u/wlw)
#### Post date: [April 30, 2008, 1:56am UTC](https://forum.kirupa.com/t/simple-preloader-help/258983/1 "2008-04-30T01:56:30Z")

</div>

[CS3 AS2]  
I’m having trouble preloading a site i’m working on. I think i’m doing it correctly but the preloader page dosen’t show up until its done loading. then jumps straight to the 2nd frame because its loaded.

I’m just doing a simple animation on frame 1 (as the preloader anim.) then when its finished loading, goToAndPlay frame 2. Any help would be appreciated.

my code:

total = \_root.getBytesTotal();  
loaded = \_root.getBytesLoaded();

if (loaded == total) {  
\_root.gotoAndPlay(2);  
}
