# Preloader problem

**URL:** <https://forum.kirupa.com/t/preloader-problem/262523>\
**Category:** Uncategorized\
**Created:** [June 6, 2008, 5:20pm UTC](https://forum.kirupa.com/t/preloader-problem/262523 "2008-06-06T17:20:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wuzzi2ya](https://avatars.discourse-cdn.com/v4/letter/w/e79b87/32.png) [@wuzzi2ya](https://forum.kirupa.com/u/wuzzi2ya)\
**Post date:** [June 6, 2008, 5:20pm UTC](https://forum.kirupa.com/t/preloader-problem/262523/1 "2008-06-06T17:20:46Z")

</div>

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…
