5 Replies Latest reply on Sep 18, 2006 6:33 PM by kglad

    Random images with setInterval

    KG800 Level 1

      Here is the code I'm using to randomly display my images, but very 20 seconds I want it to show a new image randomly. I'm sure I need to use the setInterval, but not sure how to include it into my current code. Any help would be greatly appreciated.

      filename = ["img01.swf", "img02.swf", "img03.swf", "img04.swf", "img05.swf"];
      path = " http://www.mywebsite/flash/swf/";
      i = filename.length;
      k = Math.floor(Math.random()*i);
      loadMovie(path+filename[k], my_mc);