Preloader troubles

I have a preloader that kinda breaks up so that the scene progresses as the loading progresses
apparently this causes my swf to restart when i load a movie with that preloader into it :-\
the code goes like this


onClipEvent (enterFrame) {
	var bytes = _root.getBytesTotal();
	var bytes_loaded = _root.getBytesLoaded();
	if (bytes_loaded >= bytes*20/100) {
		_root.gotoAndPlay(2);
	} else {
		_root.gotoAndStop(1);
	}
}

er, i’m not too good at explaining, hope you get the idea.

Your math is off is all.

er could u be more specific as to which part is wrong…=)

the getBytesLoaded and getBytesTotal functions return a number between 0 and 1.
Now do the math.

er
yea, that’s very helpful
thx alot
still can’t get it to work, tho
thx for the reply

ok then,
attach the file in a post and let me see it, I’ll fix it and explain…

…thanks alot:)

ok my friend,

sorry but there are so many fundamental errors in this fla that it is going to take some time to go over this.

I will get back to you if I can…

Thanks so much for your help…
this was but my first actionscript experimenting :-\

hey!

did u check out the tutorials on this site??

it will show u how to do them =)

yep i sure did…but there isn’t one on breaking up the preloader so that the loading sequence progresses as the loading does … is there? :sigh:

I see what you are trying to do here and After I looked at it really you just have a couple of things wrong, I think you are making it more difficult then it really is, I can’t right now but I will post a fla if noone else gives you an answer today

not exactly sure by what u mean sorry :smirk:

thanks for your time, but i managed to get it fixed (all i had to do was change _root to _parent, figured that _root would mean taking the main .swf instead of the individual)