Posted By

zackattack27 on 07/22/11


Tagged

array Randomize


Versions (?)

Randomize Array


 / Published in: ActionScript 3
 

  1. for (var i:uint = 0; i < myArray.length; i++)
  2. {
  3. var rand:uint = int(Math.random() * myArray.length);
  4. myArray.push( myArray.splice( rand, 1 )[0] );
  5. }

Report this snippet  

You need to login to post a comment.