Adobe Flex 2 Language Reference - collected by Jimbob | Back to MY RESOURCES


Packagemx.graphics
Classpublic class GradientEntry
InheritanceGradientEntry Inheritance Object

The GradientEntry class defines the objects that control a transition as part of a gradient fill. You use this class with the LinearGradient and RadialGradient classes to define a gradient fill.

MXML Syntaxexpanded Hide MXML Syntax

The <mx:GradientEntry> tag inherits all the tag attributes of its superclass, and adds the following tag attributes:

  <mx:GradientEntry
    Properties
    alpha="1.0"
    color="0x000000"
    ratio="-1"
  />
  

See also

mx.graphics.LinearGradient
mx.graphics.RadialGradient


Public Properties
 PropertyDefined by
  alpha : Number = 1
The transparency of a gradient fill.
GradientEntry
  color : uint
The color value for a gradient fill.
GradientEntry
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  ratio : Number
Where in the graphical element, as a percentage from 0 to 1, Flex starts the transition to the associated color.
GradientEntry
Public Methods
 MethodDefined by
  
GradientEntry(color:uint = 0, ratio:Number = -1, alpha:Number = 1)
Constructor.
GradientEntry
 Inherited
setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Property detail
alphaproperty
public var alpha:Number = 1

The transparency of a gradient fill. Possible values are 0.0 (invisible) through 1.0 (opaque).

The default value is 1.

colorproperty 
public var color:uint

The color value for a gradient fill.

ratioproperty 
public var ratio:Number

Where in the graphical element, as a percentage from 0 to 1, Flex starts the transition to the associated color. For example, a ratio of .33 means Flex begins the transition to that color 33% of the way through the graphical element.

Constructor detail
GradientEntry()constructor
public function GradientEntry(color:uint = 0, ratio:Number = -1, alpha:Number = 1)

Constructor.

Parameters
color:uint (default = 0) — The color for this gradient entry.
 
ratio:Number (default = -1) — Where in the graphical element to start the transition to the associated color. Flex uniformly spaces any GradientEntries with missing ratio values.
 
alpha:Number (default = 1) — The alpha value for this entry in the gradient. This parameter is optional. The default value is 1.





collected by Jimbob 2007.05