random

Availability

Flash Player 4. This function was deprecated in Flash 5 in favor of Math.random().

Usage

random(value)

Parameters

value An integer.

Returns

An integer.

Description

Function; returns a random integer between 0 and one less than the integer specified in the value parameter.

Example

The following use of random() returns a value of 0, 1, 2, 3, or 4:

random(5);

See also

Math.random()