Math.random() and srand in AS3
There’s no “srand” function in AS3. That is you cannot seed random number generator.
And when you get the very same results each time swf is loaded you find this:
However, if you need true randomness in an event-driven application, you can do this:
setInterval(Math.random, 10)
Flash Player will run Math.random() in background producing different random values at different points of time.
