Array shuffle oneliner.
// forked from makc3d's flash on 2011-2-11 package { import com.actionscriptbible.Example; /** * Array shuffle oneliner. */ public class ShuffleArray extends Example { public function ShuffleArray () { var a:Array = []; for (var i:int = 0; i < 100; i++) a [i] = i; a.sort (function (a:Number, b:Number):Number { return (a % 2) - (b % 2); }); trace (a); } } }