So I’ve designed a circular preloader that get filled according the percentage of loaded frames.
Everything works great with a frame or two of content aside preloader. When I add the all site with a billion of frames and movie clips, the preloader won’t work properly and I’m getting really bored with this because I spent like 4 days trying to understand what is wrong.
Unfortunately, I couldn’t find the problem I hope that the pro’s can give me an explanation of what is going wrong. Thank you all.
Code from preloader:
import flash.display.*;
import flash.events.ProgressEvent;
import flash.events.Event;
stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, loading);
this.loaderInfo.addEventListener(Event.COMPLETE, loaded);
function loading(e:ProgressEvent):void{
var porcent:Number = Math.floor((e.bytesLoaded / e.bytesTotal) * 100);
porcent_txt.text = String(porcent) + "%";
loader.gotoAndPlay(porcent);
}
function loaded(e:Event):void{
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loading);
this.loaderInfo.removeEventListener(Event.COMPLETE, loaded);
gotoAndStop("enter");
}

So first of all, thank you very much for your help it was very helpfull
The code was ok
the preloader movieclip was ok also
The problem was on a layer with some text in fact I don’t know why this problem happend my guess is that it must be related with deeper problems in my project… don’t know
Thank you again.