My pre-loader just loops through and doesn’t load according to percent completed. Also I keep getting this compiler error. Anybody have any suggestions. Thanks in advance…
The class or interface ‘Event’ could not be loaded.
stop();
addEventListener(Event.ENTER_FRAME, loading);
function loading(event:Event) {
var bytestotal = stage.loaderInfo.bytesTotal;
var bytesloaded = stage.loaderInfo.bytesLoaded;
var sclbar = Math.round(bytesloaded*100/bytestotal);
preloader.gotoAndPlay(sclbar);
if (bytesloaded >= bytestotal) {
removeEventListener(Event.ENTER_FRAME, loading);
removeChild(preloader);
gotoAndStop(2);
}
}
I have a custom animation for the preloader…