1 Reply Latest reply on Aug 7, 2006 4:39 AM by Rothrock

    Generating random numbers

    Parag.Shah Level 1
      Hi,

      I want to generate random numbers between 1 to 10. I have successfully written script for that. Now, the problem is bcuz it is random it might generate the same number again. I want to eliminate that. I have a vague idea that I will have to store each generated number in an array (using push method) and then every time a number is generated, will have to ask flash if the same exists as an element of the array. If it does, skip and generate again. This way it should generate only 10 numbers, all different, and then stop.

      However, m not able to put this through. Any help would be appreciated.

      Regards.