PDA

View Full Version : Random Numbers



phorte
August 3rd, 2003, 02:59 AM
Okay.. If i have a set of number from 1-52.. and i wanted to go through all those numbers but in a random order.. how would i go about it??

so for example i could trace all those values in a random order.. like..

10
52
4
43
....... etc

but it would go through all the numbers and not do any number more than once..

Thanks in advance..

ahmed
August 3rd, 2003, 03:01 AM
http://www.kirupaforum.com/forums/showthread.php?threadid=29076&highlight=questions

Johnny64
August 3rd, 2003, 03:48 AM
Hoi

if you want to shuffle
this is shorter...


deck.sort(function(){return random(2)});
trace(deck);


http://www.flashkit.com/board/showthread.php?threadid=470170