Preloaders are pretty simple. All you need to do is compare either the framesloaded to the totalframes or you can use the getbytesloaded and compare it to totalbytes.
Either one is aceptable.
The trick is to not use frame 0. You can also use it to check a loaded movie- loaded into a level or movie clip.
Anyhow the way to do it is this;
On your second or third frame, make sure its after your preloader. You will add this script to the frame.
Okay, I looked at your file. It has some serious problems.
One of them is that in your MC you have tweens set to 6 instead of to 0. This means that key frame 2 is actaully frame 6 and key frame 3 is actually 12.
Second on key frame 16 your AS is
vavar total = _root.getBytesTotal ();
var loaded = _root.getBytesLoaded ();
var procent = (100/total)*loaded ;
if (procent >= 100) {
_root.gotoAndPlay ("main");
}
Notice that you mistyped var ** Note ** you do not need to type var when declaring a local variable but rather just the name of it. Varvar is the name of the variable as it is not restricyed. fix the typo.
Set the tweens to 0 and fix your typo and it works.
I wouldn't have constructed it like this though- There is an easier way to acomplish this.