# PreLoader: What am I doing wrong?

**URL:** <https://forum.kirupa.com/t/preloader-what-am-i-doing-wrong/226298>\
**Category:** flash\
**Created:** [May 19, 2007, 10:31pm UTC](https://forum.kirupa.com/t/preloader-what-am-i-doing-wrong/226298 "2007-05-19T22:31:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickcherryjiggz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nickcherryjiggz/32/2107_2.png) [@nickcherryjiggz](https://forum.kirupa.com/u/nickcherryjiggz)\
**Post date:** [May 19, 2007, 10:31pm UTC](https://forum.kirupa.com/t/preloader-what-am-i-doing-wrong/226298/1 "2007-05-19T22:31:21Z")

</div>

I have the following code in the first frame of my movie:

```auto
this._lockroot = true;

import mx.transitions.Tween;
import mx.transitions.easing.*;
import flash.display.BitmapData;

#include "as/vars.as"
#include "as/misc.as"
#include "as/stageResize.as"
#include "as/intro.as"
#include "as/phase1.as"
#include "as/phase2.as"
#include "as/serverCommunication.as"

resizeAdjustments();

function preloaderProgress():Void{
    trace("here");
    var bytes:Number = _root.getBytesTotal();
    var bytes_loaded:Number = _root.getBytesLoaded();
    //code to update preloader %
    if (bytes_loaded == bytes and bytes > 0){
        clearInterval(intervalId);
        gotoAndStop("fra_intro");
    }
}
var intervalId:Number;
intervalId = setInterval(this, "preloaderProgress", 1);

```

The resizeAdjustments() function just resizes the stage and a few movie clips (very light work), and the .as files that are included are just variables and functions, nothing’s actually happening in them.

When I simulate download at 56 kb/s or so, it takes a few seconds for “fra\_main” (the beginning frame after the preloader) to load, but the preloader doesn’t show up until it’s 100% at the very end. I put in a trace at the top of preloaderProgress() but it only outputs one time and that is when fra\_main is loaded and all the preloading is over.

Is this problem because of how I’m importing classes? Or maybe because I’m using a font symbol? Frame 2 of the movie is a “preloader junk” frame where I throw in every movieclip that’s linked via actionscript but never actually put on the stage, and I also put textboxes that have all the main characters of the font symbol embedded. Even if it was an issue with something like classes or font symbols, I would think at 14.4 kb/s I would at least see some loading progress for the rest of the stuff in the movie.
