# Preloader reloads already loaded images

**URL:** <https://forum.kirupa.com/t/preloader-reloads-already-loaded-images/310581>\
**Category:** flash\
**Created:** [June 14, 2010, 11:53am UTC](https://forum.kirupa.com/t/preloader-reloads-already-loaded-images/310581 "2010-06-14T11:53:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnnyPintas](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@JohnnyPintas](https://forum.kirupa.com/u/JohnnyPintas)\
**Post date:** [June 14, 2010, 11:53am UTC](https://forum.kirupa.com/t/preloader-reloads-already-loaded-images/310581/1 "2010-06-14T11:53:31Z")

</div>

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:

```auto
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);

```
