Packagecom.desuade.utils
Classpublic class RandomColor
InheritanceRandomColor Inheritance Random Inheritance Object

Language Version : ActionScript 3
Since : 18.04.2009
Runtime Versions : AIR 1.0, Flash Player 9.0.0

The RandomColor class offers an object or a static method to return a random color between 2 specified colors.

See also

Random
ColorHelper


Public Properties
 PropertyDefined By
 Inheritedmax : Number
The Random object's maximum value for the random range.
Random
 Inheritedmin : Number
The Random object's minimum value for the random range.
Random
 Inheritedprecision : int
This is the amount of decimal places to keep when returning the value.
Random
Public Methods
 MethodDefined By
  
RandomColor(min:*, max:*)
This creates a RandomColor object than can be used over again for creating new random colors from the same range.
RandomColor
  
fromRange(min:*, max:*):uint
[static] This static function is used to return a random color from a given range.
RandomColor
 Inherited
toString():String
This returns a new random value within the range each time the Random object is read.
Random
 Inherited
valueOf():Number
This returns a new random value within the range each time the Random object is read.
Random
Constructor Detail
RandomColor()Constructor
public function RandomColor(min:*, max:*)

This creates a RandomColor object than can be used over again for creating new random colors from the same range. Can be used with the ColorTween classes, as well as any other properties requiring a Color.

Parameters
min:* — The first color in the range
 
max:* — The second color in the range

See also

Method Detail
fromRange()method
public static function fromRange(min:*, max:*):uint

This static function is used to return a random color from a given range.

Parameters

min:* — The first color in the range
 
max:* — The second color in the range

Returns
uint

See also