Apache Flex 4.16.1 API Reference | All Packages | All Classes | Index | Frames No Frames |
GradientEntry

Package | mx.graphics
Class | public class GradientEntry
Inheritance | GradientEntry flash.events.EventDispatcher

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

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 Syntax Show MXML Syntax
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="NaN"
      />

See also

mx.graphics.LinearGradient
mx.graphics.RadialGradient

Public Properties

| Property | Defined By
--- | --- | ---
|  | alpha : Number The transparency of a gradient fill. | GradientEntry
|  | color : uint The color value for a gradient fill. | GradientEntry
|  | ratio : Number Where in the graphical element, as a percentage from 0.0 to 1.0, Flex samples the associated color at 100%. | GradientEntry

Public Methods

| Method | Defined By
--- | --- | ---
|  | GradientEntry(color:uint = 0x000000, ratio:Number, alpha:Number = 1.0) Constructor. | GradientEntry

Property Detail

alpha | property

`alpha:Number`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

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

The default value is `1.0`.

This property can be used as the source for data binding.

Implementation
`public function get alpha():Number`
`public function set alpha(value:Number):void`

color | property |

`color:uint`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The color value for a gradient fill.

This property can be used as the source for data binding.

Implementation
`public function get color():uint`
`public function set color(value:uint):void`

ratio | property |

`ratio:Number`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Where in the graphical element, as a percentage from 0.0 to 1.0, Flex samples the associated color at 100%.

This property can be used as the source for data binding.

Implementation
`public function get ratio():Number`
`public function set ratio(value:Number):void`
Constructor Detail

GradientEntry | () | Constructor

`public function GradientEntry(color:uint = 0x000000, ratio:Number, alpha:Number = 1.0)`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Constructor.

Parameters

| `color:uint` (default = `0x000000`)`` — The color for this gradient entry. The default value is 0x000000 (black).
| `ratio:Number` (default = `NaN`)`` — Where in the graphical element the associated color is sampled at 100%. Flex uniformly spaces any GradientEntries with missing ratio values. The default value is NaN.
| `alpha:Number` (default = `1.0`)`` — The alpha value for this entry in the gradient. This parameter is optional. The default value is 1.0.

Wed Nov 15 2017, 09:50 AM +01:00