/ Published in: ActionScript
Expand |
Embed | Plain Text
Array.prototype._shuffle = function() { /* * This replaces original array and does not return a value */ var ary_length = this.length; for (var i=0; i < ary_length; ++i) { var randomize = Math.floor(Math.random()*ary_length); var temp = this[i]; this[i] = this[randomize]; this[randomize] = temp; } return this; }// End Function
You need to login to post a comment.
