MC looping if site not cached

Hi all,
hopefully someone can help me with this little one. I am using a loading random movies into the main movie using the code below, however, if you are visiting the site for the first time the movie clip loaded will continuously loop instead of stopping once loaded. If you visit the site again though, once it has been cached locally it doesn’t do it!! its getting on my knockers now!!

//code to load random movie
filename = [“aerial_pic_1.swf”, “aerial_pic_2.swf”, “aerial_pic_3.swf”];
path = “http://www.charlesward.com/”;
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], _root.main_image);

URL: www.charlesward.com

Any help much appreciated,
Cheers, Pat