hello,
i just setup this loader i found on the net:
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("world.jpg"));
function loop(e:ProgressEvent):void{
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString();
}
function done(e:Event):void{
removeChildAt(0);
percent = null;
addChild(l);
}
what i dont understand is that everytime i click the refresh page the loader shows up again(this time loading the image faster) but if the image is already in cache the loader should not show at all (?), i would like to achieve a loader that loads the image and after dont come up again everytime.