Chris Herring

 Creative Developer working in Advertising

 London

Posts Tagged ‘array’

Shuffle Shuffle Array

21/07/09

Some projects you find yourself needing to shuffle arrays to randomise the objects within, below is a little static function for Actionscript 3 which will do the above. In order to use the function you need to do the following… toBeShuffledArray = ArrayShuffle.shuffle(toBeShuffledArray); public class ArrayShuffle() { public static function shuffle(array:Array):Array { var obj:*; var [...]