Question ! Could anyone help me with it

Hello,

well i have 3 mcs (mc1,mc2,mc3), each loads .jpg files in it randomly. The question is how to make each of them not repeat previously loaded one.

Example of code that im using

 
filename = ["image"+random(7)+".jpg"]; 
path = "img/"; 
i = filename.length; 
k = Math.floor(Math.random()*i); 
loadMovie(path+filename[k], mc1);

for example sometimes mc1 would load image1.jpg and others would load the same and so on. how to avoid such repeating ?

thanks