Found this over atĀ daveoncode and thought i would like to share it:
1 2 3 4 5 6 7 8 9 10
| private function _getRandom (arr :Array):void
var arr2 :Array = new Array();
while (arr .length > 0 ) {
arr2 .push(arr .splice(Math.round(Math.random() * (arr .length - 1 )), 1 )[0 ]);
}
return arr2 ;
} |