# Random Number Question

**URL:** <https://forum.kirupa.com/t/random-number-question/189435>\
**Category:** flash\
**Created:** [June 2, 2006, 2:32pm UTC](https://forum.kirupa.com/t/random-number-question/189435 "2006-06-02T14:32:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dr77](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@dr77](https://forum.kirupa.com/u/dr77)\
**Post date:** [June 2, 2006, 2:32pm UTC](https://forum.kirupa.com/t/random-number-question/189435/1 "2006-06-02T14:32:45Z")

</div>

Hello all…

I have this simple bit of code which is used regularly in my movie…

**minNum = 1;  
maxNum = 200;  
number = Math.ceil(Math.random() \* (maxNum - minNum + 1)) + (minNum - 1);**

Is it possible to add something to this code to stop the same number being called more than once?

David
