random function

random(value:Number) : Number

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

Returns a random integer between 0 and one less than the integer specified in the value parameter.

Availability: ActionScript 1.0; Flash Player 4

Parameters

value:Number - An integer.

Returns

Number - A random integer.

Example

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

See also

random (Math.random method)


Version 8

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00001764.html