actionscript question

Out of context: Reply #12

  • Started
  • Last post
  • 14 Responses
  • itstimefortea0

    this is close, its set up to load 3 separate images, but doesn't work very well when i delete the last 2 lines....

    var images = ["img1.jpg","img2.jpg","img3.jpg...
    function randomize(arr:Array){
    var tmp,rn;
    var len = arr.length;
    for(var i=0;i < len;i++){
    tmp = arr[i];
    arr[i] = arr[rn = random(len)];
    arr[rn] = tmp;
    }
    }
    randomize(images);
    trace(images); //random order..

    mc1.loadMovie(images[0]);
    mc2.loadMovie(images[1]);
    mc3.loadMovie(images[2]);

View thread