Like the title suggests… Is it possible to srand
Flash's Math.random
?
I'm asking because I'd like to generate psudo-random numbers in a repeatable way.
Like the title suggests… Is it possible to srand
Flash's Math.random
?
I'm asking because I'd like to generate psudo-random numbers in a repeatable way.
Nope. But in the past I have used BitmapData.noise() as a poor man's substitute. That takes a seed, and you can use it to fill a dummy bitmap with values from 0..255 (which can be extracted and treated as a ByteArray if you like). Not exactly suitable for cryptography, but it will work as a quick hack.