Preloader not working in MX

I know this sounds weird, but I can’t get the dam thing to work. I used the exact same code with flash 5, but its not working in MX. I tried the code with and without the “_root.” just to make sure…

Frame 1 of Main Timeline::

nTotal = _root.getBytesTotal()/1000
nLoaded = _root.getBytesTotal()/1000
nPercent = _root.Math.round(nLoaded/nTotal)
nRemain = _root.Math.round(nTotal - nLoaded)
if (nLoaded >= nTotal && nLoaded != 0){
&nbsp &nbsp &nbsp &nbsp gotoAndPlay(4)
_root.loader._xscale = nPercent
nRead = nPercent+"%"

Frame 3 of Main Timeling::

and in Frame 4 is the image that is going to be loaded.

Now, what I don’t understand is with Flash MX, instead of it going to frame 1, and looping, it goes to frame 3, and stops. It just stays there. And the rest of the Bytes load, but it just stays there even after its all loaded.

The really strange thing is that I have a box in the 3rd layer that is in Frames 1-3 and I also have text and a dynamic text box in the 4th layer that is in all three frames as well, and nothing shows up, just the orange background… If anyone sees a problem in my code let me know.

‘nLoaded’ is set improperly:
it says:
nLoaded = _root.getBytesTotal()/1000
and it should say:
nLoaded = _root.getBytesLoadedl()/1000


Ok thanks. I always miss something in my code. My debugging skills need a lil’ bit o’ work. Thanks Sinf.

nLoaded = _root.getBytesLoadedl()/1000 ??
I’d say ** Loaded**, not Loaded** l** :rollin:

pom 0]