Hi
currently I'm having some problems with my preloader.
I have an as3 class website with the following code:
public function Website() {
addEventListener(Event.ENTER_FRAME, PreloaderStart);
}
private function PreloaderStart(e:Event):void {
var bt:int=loaderInfo.bytesTotal;
var bl:int=loaderInfo.bytesLoaded;
trace(bl/bt);
var pt:int=Math.round(100*bl/bt);
preloaderMC.loadInfo.text="loading "+pt+"%";
if (bl==bt) {
removeEventListener(Event.ENTER_FRAME, PreloaderStart);
PreloaderOnComplete();
}
}
private function PreloaderOnComplete():void {
trace("loaded");
buildUI();
}
I painted my stage black and when I simply run my flash file it traced "loaded" so everything is loaded well and it builds the UI. But when I simulate by pressing ctrl+ enter twice I get a white screen and after about 10 sec. (my swf is 1mb and it simulates at 100kbs) it displays the preloader instantly at 100% and loads my UI. So my text doesn't change from 0% -> 100% but I just get 100% when everything is loaded.
if anyone can help me out, I would be thankfull.
Regards