Preloader not working

Hi,I don’t know why this code for preloading does not work. It shows the preloading
sequence, but when it touches 100, it still is stuck with the preloader scene. It does not advance to the main scene as told in the if condition. It’s ripping me
has this script. Frame 2 has a gotoandplay(1); just to loop the preloader.
That’s all. I included a trace to see if the percent value was correct, it is
correct, but i can’t understand why does in not advance to the main scene.

There is no stop action in frame 1 of the Main scene. Please help // This script must have two keyframes:// FIRST KEYFRAME ------------------------// The first step is create a text field with variable name “loadedField”. In that field,// Flash gonna paste the porcent loaded for the movie in text format.percent = Math.floor(getBytesLoaded()/getBytesTotal()*100);loadedField = percent+"% loaded of "+Math.floor(getBytesTotal()/1024)+“kb”;// The second step is create the progress bar. With the rectangle tool we drag// and create, then convert to movie clip symbol with the variable name “bar”.// If you see in the script, we use the property “_xscale”. In that way, flash apply in// horizontal mode the percent loaded to the symbol “bar”.if(percent != 100){ setProperty(bar, _xscale, percent);}// The third step is to check for loaded file. If the percent loaded is 100%, then go// to the frame where the animation begin. I prefer put the preloader on one scene// and the animation in another.if (percent == 100) { gotoAndPlay(“main”, “1”);}// SECOND KEYFRAME ------------------------// Put this script in the second keyframe.gotoAndPlay(1);// On this way, the movie loop till the file become 100% loaded.