9 Replies Latest reply on Feb 27, 2013 11:12 AM by kglad

    shuffle movie clips on stage

    mandar vedak Level 1

      How i add my movieclips on stage in array


      when load swf onstage movieclip change their position according to array


      my movieclips names are m1,m2 to m24 in 6column x4rows




      var numberArray_arr:Array = new Array('0','1','2','3','4','5','6','7','8','9');

      function arrayShuffle(array_arr:Array):Array{

            for(var i:Number = 0; i < array_arr.length; i++){

               var randomNum_num = Math.floor(Math.random() * array_arr.length)

               var arrayIndex = array_arr[i];

               array_arr[i] = array_arr[randomNum_num];

               array_arr[randomNum_num] = arrayIndex;


            return array_arr;