/ Published in: ActionScript 3

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private function shuffleArray($array:Array):Array { var shuffledArray:Array = new Array(); while ($array.length > 0) { shuffledArray.push($array.splice(Math.round(Math.random() * ($array.length - 1)), 1)[0]); } return shuffledArray; }
URL: http://flassari.is/2009/04/as3-array-shuffle/
Comments
