| Package | spark.filters | 
| Class | public class GradientFilter | 
| Inheritance | GradientFilter  BaseDimensionFilter  BaseFilter  EventDispatcher  Object | 
| Subclasses | GradientBevelFilter, GradientGlowFilter | 
| Language Version: | ActionScript 3.0 | 
| Product Version: | Flex 4 | 
| Runtime Versions: | Flash Player 10, AIR 1.5 | 
 Hide MXML Syntax
Hide MXML SyntaxThe <s:GradientFilter> tag inherits all of the tag 
  attributes of its superclass and adds the following tag attributes:
  <s:GradientFilter
    Properties
    angle="45"
    distance="4.0"
    entries="[]"
    type="inner"
  />
  
Default MXML Propertyentries
Related API Elements
| Property | Defined By | ||
|---|---|---|---|
| angle : Number 
      The angle, in degrees. | GradientFilter | ||
|  | blurX : Number 
      The amount of horizontal blur. | BaseDimensionFilter | |
|  | blurY : Number 
      The amount of vertical blur. | BaseDimensionFilter | |
|  | constructor : Object 
	 A reference to the class object or constructor function for a given object instance. | Object | |
| distance : Number 
      The offset distance of the glow. | GradientFilter | ||
| entries : Array 
      An Array of GradientEntry objects
      defining the fill patterns for the gradient fill. | GradientFilter | ||
|  | knockout : Boolean 
      Specifies whether the object has a knockout effect. | BaseDimensionFilter | |
|  | quality : int 
      The number of times to apply the filter. | BaseDimensionFilter | |
|  | strength : Number 
      The strength of the imprint or spread. | BaseDimensionFilter | |
| type : String 
      The placement of the filter effect. | GradientFilter | ||
| Method | Defined By | ||
|---|---|---|---|
| 
     Constructor. | GradientFilter | ||
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void 
	Registers an event listener object with an EventDispatcher object so that the listener 
	receives notification of an event. | EventDispatcher | |
|  | 
	Dispatches an event into the event flow. | EventDispatcher | |
|  | 
	Checks whether the EventDispatcher object has any listeners registered for a specific type 
	of event. | EventDispatcher | |
|  | 
	 Indicates whether an object has a specified property defined. | Object | |
|  | 
	 Indicates whether an instance of the Object class is in the prototype chain of the object specified 
	 as the parameter. | Object | |
|  | 
         Propagates a change event when the filter has changed. | BaseFilter | |
|  | 
	 Indicates whether the specified property exists and is enumerable. | Object | |
|  | 
	Removes a listener from the EventDispatcher object. | EventDispatcher | |
|  | 
     Sets the availability of a dynamic property for loop operations. | Object | |
|  | 
	 Returns the string representation of this object, formatted according to locale-specific conventions. | Object | |
|  | 
	 Returns the string representation of the specified object. | Object | |
|  | 
	 Returns the primitive value of the specified object. | Object | |
|  | 
	Checks whether an event listener is registered with this EventDispatcher object or any of 
	its ancestors for the specified event type. | EventDispatcher | |
| Event | Summary | Defined By | ||
|---|---|---|---|---|
|  | [broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | ||
|  | [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher | ||
| Constant | Defined By | ||
|---|---|---|---|
| angle | property | 
angle:Number| Language Version: | ActionScript 3.0 | 
| Product Version: | Flex 4 | 
| Runtime Versions: | Flash Player 10, AIR 1.5 | 
The angle, in degrees. Valid values are 0 to 360. The angle value represents the angle of the theoretical light source falling on the object and determines the placement of the effect relative to the object. If distance is set to 0, the effect is not offset from the object, and therefore the angle property has no effect.
 The default value is 45.
Implementation
    public function get angle():Number    public function set angle(value:Number):void| distance | property | 
| entries | property | 
entries:Array| Language Version: | ActionScript 3.0 | 
| Product Version: | Flex 4 | 
| Runtime Versions: | Flash Player 10, AIR 1.5 | 
An Array of GradientEntry objects defining the fill patterns for the gradient fill.
 The default value is [].
This property can be used as the source for data binding. When this property is modified, it dispatches the  propertyChange  event.
Implementation
    public function get entries():Array    public function set entries(value:Array):void| type | property | 
type:String| Language Version: | ActionScript 3.0 | 
| Product Version: | Flex 4 | 
| Runtime Versions: | Flash Player 10, AIR 1.5 | 
The placement of the filter effect. Possible values are flash.filters.BitmapFilterType constants:
- BitmapFilterType.OUTER- Glow on the outer edge of the object.
- BitmapFilterType.INNER- Glow on the inner edge of the object.
- BitmapFilterType.FULL- Glow on top of the object.
 The default value is BitmapFilterType.INNER.
Implementation
    public function get type():String    public function set type(value:String):voidRelated API Elements
| GradientFilter | () | Constructor | 
public function GradientFilter(colors:Array = null, alphas:Array = null, ratios:Array = null)| Language Version: | ActionScript 3.0 | 
| Product Version: | Flex 4 | 
| Runtime Versions: | Flash Player 10, AIR 1.5 | 
Constructor.
Parameters| colors:Array(default =null)— An array of RGB hexadecimal color values to use in the gradient.
     For example, red is 0xFF0000, blue is 0x0000FF, and so on. | |
| alphas:Array(default =null)— An array of alpha transparency values for the corresponding colors in
     thecolorsarray. Valid values for each element in the array are 0 to 1.
     For example, .25 sets a transparency value of 25%. | |
| ratios:Array(default =null)— An array of color distribution ratios; valid values are
     0 to 255. | 
Thu Dec 4 2014, 05:50 PM -08:00
 Show MXML Syntax
Show MXML Syntax