Forum Moderators: open

Message Too Old, No Replies

Elements of an Array in a Random Order

         

stormshield

7:27 pm on Apr 12, 2006 (gmt 0)

10+ Year Member



Does any one know how to do it? I need to
mix all the elements (colors) in the array.

colorsall = ["0xF90000", "0xF1DF0E", "0x3218E7", "0x2BD629", "0xEE11EE", "0x000000", "0x885FD6", "0xCCCCCC"];

Storm

Richard_N

9:51 pm on Apr 12, 2006 (gmt 0)



probably at a quick guess by using math rand to generate a random whole number between 1 and whatever and then apply that to a variable which references e array.

Not really thought it through but quick answer off the top of my head.