1083 syntax error
i am trying to create a preLoader for my animation and i keep getting the 1083 syntax error and idk y but this is my action script someone plz help.

stop();

addEventListener(event.ENTER_FRAME,preLoad)

function preLoad(e:event):void{

		var bytestoload:Number = LoaderInfo.bytesTotal;
		var NumberLoaded:Number = LoaderInfo.bytesLoaded;
		if (BytesToLoad == NumberLoaded)
		    removeEventListener(event.ENTER_FRAME,preLoad)
			gotoAndStop(2);
        }else {
			preLoader.preLoaderfill.scaleX = NumberLoaded/ByteToLoad;
			preLoader.bytesPercent.text = Math.floor(NumberLoaded/ByteToLoad*100) + "%";
		}
}
1083 syntax error
===

i am trying to create a preLoader for my animation and i keep getting the 1083 syntax error and idk y but this is my action script someone plz help.

stop();

addEventListener(event.ENTER_FRAME,preLoad)

function preLoad(e:event):void{

		var bytestoload:Number = LoaderInfo.bytesTotal;
		var NumberLoaded:Number = LoaderInfo.bytesLoaded;
		if (BytesToLoad == NumberLoaded)
		    removeEventListener(event.ENTER_FRAME,preLoad)
			gotoAndStop(2);
        }else {
			preLoader.preLoaderfill.scaleX = NumberLoaded/ByteToLoad;
			preLoader.bytesPercent.text = Math.floor(NumberLoaded/ByteToLoad*100) + "%";
		}
}