1 Reply Latest reply on May 1, 2007 7:51 AM by dr_ross

    Random image loader

    dickandjanerocks
      Hello I already have a page built but I am looking to load random images and do not know how any help would appreciated. The existing page is http://www.dickandjanerocks.com The images of band members is what I would like to randomizeI can provide the original flash file if needed
        • 1. Re: Random image loader
          dr_ross Level 1
          just put the names of the images into an array,

          var my_array = ["image1.jpg","image2.jpg","image3.jpg"];

          then either shuffle it and pull them out using an incrementing variable as the element number everytime you want to change it.

          Or you can just hack it with

          var imageName_str = my_array[random(my_array.length)];

          but then you'll end up with same image sometimes