# Random Numbers

**URL:** <https://forum.kirupa.com/t/random-numbers/27500>\
**Category:** flash\
**Created:** [August 3, 2003, 6:59am UTC](https://forum.kirupa.com/t/random-numbers/27500 "2003-08-03T06:59:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phorte](https://avatars.discourse-cdn.com/v4/letter/p/77aa72/32.png) [@phorte](https://forum.kirupa.com/u/phorte)\
**Post date:** [August 3, 2003, 6:59am UTC](https://forum.kirupa.com/t/random-numbers/27500/1 "2003-08-03T06:59:17Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2003, 7:01am UTC](https://forum.kirupa.com/t/random-numbers/27500/2 "2003-08-03T07:01:13Z")

</div>

[http://www.kirupaforum.com/forums/showthread.php?threadid=29076&highlight=questions](http://www.kirupaforum.com/forums/showthread.php?threadid=29076&highlight=questions)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2003, 7:48am UTC](https://forum.kirupa.com/t/random-numbers/27500/3 "2003-08-03T07:48:32Z")

</div>

Hoi

if you want to shuffle  
this is shorter…

```auto

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

```

[http://www.flashkit.com/board/showthread.php?threadid=470170](http://www.flashkit.com/board/showthread.php?threadid=470170)
