I know, this may sound like a beginner problem, however I am a beginner. I am making an application in Flash Builder 4 and I would like to find a function to generate a random number from an array of numbers I supply it with.
Example: I have 10 checkboxes,with ten numbers (1,20,-5,-9,56,908,6,45,-23,-99) written aside them. Then, I want my application to generate a random number from the checked ones. How should I do it?
You need to find a random number between 0 and array length. Then use that as index to get the value from the array.
Check this link to find out how to generate random number between 0 and a max value
A year ago, I asked here for help - you answered. Now, the same. Thanks a lot!