Windows Mac Compatibility

Hi all,
Got a problem with some random movie loading script, it works fine on a PC, loading a random movie out of a list when entering a frame, but on a Mac the random movie will not automatically display, however when one of the buttons if clicked it will load the movie.

This is the code:

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

Any ideas anyone? this is the last bug in the project.
Much appreciated anyone that can help, adios