random( ) Global Function | Flash 4; deprecated in Flash 5 in favor of Math.random( ) |
generate a random number |
A positive integer.
A random integer between 0 and number - 1 (inclusive).
The deprecated random( ) function was used in Flash 4 to generate random numbers. This function has been retired from the language and is available only for the sake of backward compatibility. In Flash 5 and later, use the preferred Math.random( ) method. Note that random( ) generated integers from 0 to number - 1, whereas Math.random( ) generates floats from 0.0 to .999.