i have an array in as3 which has elements like
MyArray2[0] = 25;
MyArray2[1] = 31;
MyArray2[2] = 45;
MyArray2[3] = 50;
MyArray2[4] = 81;
MyArray2[5] = 90;
MyArray2[6] = 94;
i want to randmize this array and array may contain more values …
what should i do??
i have made the dirty alogrithm for it…
i need some good optimize way??
Haven’t looked at AS3 in a long while, but here’s some basic code that you should be able to use pretty easily.
Basically, you’re just iterating over the array and swapping each element with a random element.