May 2001
Intermediate to advanced
720 pages
23h 24m
English
random( ) Global Function — generate a random number
Flash 4; deprecated in Flash 5 in favor of Math.random(
)
random(number)
A positive integer.
A random integer greater than or equal to
0 and less than number.
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 higher, use the preferred
Math.random( ) method. Note that
random( ) generated integers from
to number -1, whereas Math.random(
) generates floats from 0.0 to .999.
Math.random( )
Read now
Unlock full access