Hi guys.
I have a strange problem with a preloader and I don´t really know what´s going on here.
What happens is i have a preloader that works just fine (has a horizontal bar that stretches with _width and a percentage). I use it to load images onto a mc.
The problem is that when i load an image, i then load another one but if i come back to the first one, flash preloads it again as if i had not seen it before.
So every image i load beying the first time or second, the preloader does its thing every single time.
What i would like would be to preload an image but once its loaded, the second time i would click on it the image would just appear.
Is it a cache thing that once i get it online i would get the result i´m after?
this is the code i´m using:
preVert._visible = false;
var loader:MovieClipLoader = new MovieClipLoader();
var loadHandler:Object = new Object();
loader.addListener(loadHandler);
loadHandler.onLoadStart = function(_mc:MovieClip) {
preVert._visible = true;
};
loadHandler.onLoadProgress = function(_mc:MovieClip, loaded:Number, total:Number) {
preVert._width = (loaded/total)*390;
preloader.text = Math.floor(loaded/total*100)+"%";
};
loadHandler.onLoadComplete = function(_mc:MovieClip) {
preVert._visible = false;
play();
};
loader.loadClip("imagens/image"+_root.numero+".jpg",this.contentorimagem.picVert);