Preloading external jpegs

i’m currently making a slideshow for work, and they want all the pictures to preload before the show starts… here’s my code


var mymcl = new MovieClipLoader;
var mymclistener:Object = new Object;


mymclistener.onLoadStart = function (target){
	var loadProgress = mymcl.getProgress(target);
	trace("the clip "+target+" has started loading");
	trace("Bytes loaded: "+loadProgress.bytesLoaded);
	trace("Total bytes: "+loadProgress.bytesTotal);
}

 
 
 mymclistener.onLoadProgress = function(target, totalbytes, loadedbytes){
	 trace ("Bytes loaded:   "+loadedbytes);
	 trace("bytes total:      "+totalbytes);
 }
 
 mymclistener.onLoadComplete = function(target){
	 var loadProgress = mymcl.getProgress(target);
	 mytrace(target+"has finished loading");
	 trace ("Bytes loaded: "+loadProgress.bytesLoaded+" Bytes total: "+loadProgress.bytesLoaded);
 }
 
 
mymclistener.onLoadInit = function(target){
	trace ("MC:"+target+" is good to go");
	target._x = 0
	target._y = 0;
}

mymcl.addListener(mymclistener);
mymcl.loadClip("http://www.jahdesign.com/pictures/1.jpg", holder);

works nicely… however, i can’t get it to load all the pictures! i tried something like this


for (i=1; i<4; i++){
mymcl.loadClip("http://www.jahdesign.com/pictures"+1+".jpg", holder);
}

all this does is jump to the last picture and load that one… so it had me thinking, and i did this to see what would happen:


btn1.onPress = function(){
mymcl.loadClip("http://www.jahdesign.com/pictures/1.jpg", holder);
}
// i made three buttons like this one

and what happens to that is, the pictures get preloaded each time the button is pressed. (meaning instead of preloading the first time and showing up immediately thereafter, it’s preloaded every time!)

i’m lost and i really don’t know where i’m going with this… could somebody please explain to me what i’m doing wrong and what i need to do? if my problem is clear enough, i want to preload multiple jpegs then display them one after another (like in a slideshow) in a movie clip (“holder” as in the code above)… please? thank you!

about the preloading everytime the button is pressed thing: it actually works, i had been testing it in flash and never thought to publish it and run it in it’s actual environment. i still have it other problems though if anybody could help.

yet another question.


mymcl.loadClip("http://www.jahdesign.com/pictures/1.jpg", holder);

//could i use the line below to re-call the same picture if another is currently in the holder clip and would it be preloaded??

holder.loadMovie("http://www.jahdesign.com/pictures/1.jpg");


anybody?