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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.