Pacotemx.effects
Interfacepublic interface IEffect extends IEventDispatcher
ImplementorsEffect

The IEffect interface defines the base interface of all Flex effects. The IEffectInstance interface defines the base interface for all effect instance subclasses.

Veja também

mx.effects.IEffectInstance


Propriedades Públicas
 PropriedadeDefinido por
  className : String
[read-only] The name of the effect class, such as "Fade".
IEffect
  customFilter : EffectTargetFilter
Specifies a custom filter object, of type EffectTargetFilter, used by the effect to determine the targets on which to play the effect.
IEffect
  duration : Number
Duration of the effect in milliseconds.
IEffect
  effectTargetHost : IEffectTargetHost
A property that lets you access the target list-based control of a data effect.
IEffect
  filter : String
Specifies an algorithm for filtering targets for an effect.
IEffect
  hideFocusRing : Boolean
Determines whether the effect should hide the focus ring when starting the effect.
IEffect
  instanceClass : Classe
An object of type Classe that specifies the effect instance class class for this effect class.
IEffect
  isPlaying : Boolean
[read-only] A read-only flag which is true if any instances of the effect are currently playing, and false if none are.
IEffect
  perElementOffset : Number
Additional delay, in milliseconds, for effect targets after the first target of the effect.
IEffect
  relevantProperties : Array
An Array of property names to use when performing filtering.
IEffect
  relevantStyles : Array
An Array of style names to use when performing filtering.
IEffect
  repeatCount : int
Number of times to repeat the effect.
IEffect
  repeatDelay : int
Amount of time, in milliseconds, to wait before repeating the effect.
IEffect
  startDelay : int
Amount of time, in milliseconds, to wait before starting the effect.
IEffect
  suspendBackgroundProcessing : Boolean
If true, blocks all background processing while the effect is playing.
IEffect
  target : Object
The UIComponent object to which this effect is applied.
IEffect
  targets : Array
An Array of UIComponent objects that are targets for the effect.
IEffect
  triggerEvent : Event
The Event object passed to this Effect by the EffectManager when an effect is triggered, or null if the effect is not being played by the EffectManager.
IEffect
Métodos Públicos
 MétodoDefinido por
 Inherited
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.
IEventDispatcher
  
Captures the current values of the relevant properties on the effect's targets and saves them as end values.
IEffect
  
Captures the current values of the relevant properties of an additional set of targets This function is used by Flex when a data change effect is run.
IEffect
  
Captures the current values of the relevant properties on the effect's targets.
IEffect
  
Creates a single effect instance and initializes it.
IEffect
  
createInstances(targets:Array = null):Array
Takes an Array of target objects and invokes the createInstance() method on each target.
IEffect
  
Removes event listeners from an instance and removes it from the list of instances.
IEffect
 Inherited
Dispatches an event into the event flow.
IEventDispatcher
  
end(effectInstance:IEffectInstance = null):void
Interrupts an effect that is currently playing, and jumps immediately to the end of the effect.
IEffect
  
Returns an Array of Strings, where each String is the name of a property that is changed by this effect.
IEffect
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
IEventDispatcher
  
Pauses the effect until you call the resume() method.
IEffect
  
play(targets:Array = null, playReversedFromEnd:Boolean = false):Array
Begins playing the effect.
IEffect
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
IEventDispatcher
  
Resumes the effect after it has been paused by a call to the pause() method.
IEffect
  
Plays the effect in reverse, if the effect is currently playing, starting from the current position of the effect.
IEffect
  
Stops the effect, leaving the effect targets in their current state.
IEffect
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
IEventDispatcher
Detalhes da propriedade
classNamepropriedade
className:String  [read-only]

The name of the effect class, such as "Fade".

This is a short, or unqualified, class name that does not include the package name. If you need the qualified name, use the getQualifiedClassName() method in the flash.utils package.


Implementação
    public function get className():String
customFilterpropriedade 
customFilter:EffectTargetFilter  [read-write]

Specifies a custom filter object, of type EffectTargetFilter, used by the effect to determine the targets on which to play the effect.

Target filtering is only performed if you call the captureStartValues() method before playing the effect. Flex automatically calls the captureStartValues() method when the effect is part of a transition.

Use the filter property for simple filtering. If the customFilter property is non-null, the filter property is ignored.

The default value is null.


Implementação
    public function get customFilter():EffectTargetFilter
    public function set customFilter(value:EffectTargetFilter):void

Veja também

durationpropriedade 
duration:Number  [read-write]

Duration of the effect in milliseconds.

In a Parallel or Sequence effect, the duration property sets the duration of each effect. For exemplo, if a Sequence effect has its duration property set to 3000, each effect in the Sequence takes 3000 ms to play.

For a repeated effect, the duration property specifies the duration of a single instance of the effect. Therefore, if an effect has a duration property set to 2000, and a repeatCount property set to 3, the effect takes a total of 6000 ms (6 seconds) to play.

The default value is 500.


Implementação
    public function get duration():Number
    public function set duration(value:Number):void
effectTargetHostpropriedade 
effectTargetHost:IEffectTargetHost  [read-write]

A property that lets you access the target list-based control of a data effect. This property enables an instance of an effect class to communicate with the list-based control on which the effect is playing.


Implementação
    public function get effectTargetHost():IEffectTargetHost
    public function set effectTargetHost(value:IEffectTargetHost):void
filterpropriedade 
filter:String  [read-write]

Specifies an algorithm for filtering targets for an effect. A value of null specifies no filtering.

Target filtering is only performed if you call the captureStartValues() method before playing the effect. Flex automatically calls the captureStartValues() method when the effect is part of a transition, or part of a data effect for a list-based control.

Use this property for simple filtering. Use the customFilter property for more complex filtering. If the customFilter property has a non-null value, this property is ignored.

You can use the following values for the filter property:

The default value is null.


Implementação
    public function get filter():String
    public function set filter(value:String):void
hideFocusRingpropriedade 
hideFocusRing:Boolean  [read-write]

Determines whether the effect should hide the focus ring when starting the effect. The effect target is responsible for the hiding the focus ring. Subclasses of the UIComponent class hide the focus ring automatically. If the effect target is not a subclass of the UIComponent class, you must add functionality to it to hide the focus ring.

Set this property to true to hide the focus ring during the effect.

For subclasses of Effect, the default value is false. For subclasses of MaskEffect, the default value is true.


Implementação
    public function get hideFocusRing():Boolean
    public function set hideFocusRing(value:Boolean):void
instanceClasspropriedade 
instanceClass:Classe  [read-write]

An object of type Classe that specifies the effect instance class class for this effect class.

All subclasses of the Effect class must set this property in their constructor.


Implementação
    public function get instanceClass():Classe
    public function set instanceClass(value:Classe):void
isPlayingpropriedade 
isPlaying:Boolean  [read-only]

A read-only flag which is true if any instances of the effect are currently playing, and false if none are.


Implementação
    public function get isPlaying():Boolean
perElementOffsetpropriedade 
perElementOffset:Number  [read-write]

Additional delay, in milliseconds, for effect targets after the first target of the effect. This value is added to the value of the startDelay property.


Implementação
    public function get perElementOffset():Number
    public function set perElementOffset(value:Number):void
relevantPropertiespropriedade 
relevantProperties:Array  [read-write]

An Array of property names to use when performing filtering. This property is used internally and should not be set by effect users.

The default value is equal to the Array returned by the getAffectedProperties() method.


Implementação
    public function get relevantProperties():Array
    public function set relevantProperties(value:Array):void
relevantStylespropriedade 
relevantStyles:Array  [read-write]

An Array of style names to use when performing filtering. This property is used internally and should not be set by effect users.

The default value is equal to the Array returned by the getAffectedProperties() method.


Implementação
    public function get relevantStyles():Array
    public function set relevantStyles(value:Array):void
repeatCountpropriedade 
repeatCount:int  [read-write]

Number of times to repeat the effect. Possible values are any integer greater than or equal to 0. A value of 1 means to play the effect once. A value of 0 means to play the effect indefinitely until stopped by a call to the end() method.

The default value is 1.


Implementação
    public function get repeatCount():int
    public function set repeatCount(value:int):void
repeatDelaypropriedade 
repeatDelay:int  [read-write]

Amount of time, in milliseconds, to wait before repeating the effect. Possible values are any integer greater than or equal to 0.

The default value is 0.


Implementação
    public function get repeatDelay():int
    public function set repeatDelay(value:int):void
startDelaypropriedade 
startDelay:int  [read-write]

Amount of time, in milliseconds, to wait before starting the effect. Possible values are any int greater than or equal to 0. If the effect is repeated by using the repeatCount property, the startDelay is only applied to the first time the effect is played.

The default value is 0.


Implementação
    public function get startDelay():int
    public function set startDelay(value:int):void
suspendBackgroundProcessingpropriedade 
suspendBackgroundProcessing:Boolean  [read-write]

If true, blocks all background processing while the effect is playing. Background processing includes measurement, layout, and processing responses that have arrived from the server. The default value is false.

You are encouraged to set this property to true in most cases, because it improves the performance of the application. However, the property should be set to false if either of the following is true:

The default value is false.


Implementação
    public function get suspendBackgroundProcessing():Boolean
    public function set suspendBackgroundProcessing(value:Boolean):void
targetpropriedade 
target:Object  [read-write]

The UIComponent object to which this effect is applied. When an effect is triggered by an effect trigger, the target property is automatically set to be the object that triggers the effect.


Implementação
    public function get target():Object
    public function set target(value:Object):void
targetspropriedade 
targets:Array  [read-write]

An Array of UIComponent objects that are targets for the effect. When the effect is playing, it performs the effect on each target in parallel. Setting the target property replaces all objects in this Array. When the targets property is set, the target property returns the first item in this Array.


Implementação
    public function get targets():Array
    public function set targets(value:Array):void
triggerEventpropriedade 
triggerEvent:Event  [read-write]

The Event object passed to this Effect by the EffectManager when an effect is triggered, or null if the effect is not being played by the EffectManager.


Implementação
    public function get triggerEvent():Event
    public function set triggerEvent(value:Event):void
Detalhes do método
captureEndValues()método
public function captureEndValues():void

Captures the current values of the relevant properties on the effect's targets and saves them as end values.

Flex automatically calls the captureEndValues() method when the effect is part of a data change effect.

captureMoreStartValues()método 
public function captureMoreStartValues(targets:Array):void

Captures the current values of the relevant properties of an additional set of targets

This function is used by Flex when a data change effect is run.

Parâmetros

targets:Array — Array of targets for which values will be captured

captureStartValues()método 
public function captureStartValues():void

Captures the current values of the relevant properties on the effect's targets. Flex automatically calls the captureStartValues() method when the effect is part of a transition.

Use this function when you want the effect to figure out the start and end values of the effect. The proper usage of this function is to use it in the following steps:

  1. Call the captureStartValues() method. The effect captures the starting effect values.
  2. Make changes to your effect targets, such as adding/removing children, altering properties, changing location, or changing dimensions.
  3. Call the play() method. The effect captures the end values. This function populates the EffectInstance.propertyChanges property for each effect instance created by this effect. Effect developers can use the propertyChanges property to retrieve the start and end values for their effect.

createInstance()método 
public function createInstance(target:Object = null):IEffectInstance

Creates a single effect instance and initializes it. Use this method instead of the play() method to manipulate the effect instance properties before the effect instance plays.

The effect instance is created with the type specified in the instanceClass property. It is then initialized using the initInstance() method. If the instance was created by the EffectManager (when the effect is triggered by an effect trigger), the effect is further initialized by a call to the EffectInstance.initEffect() method.

Calling the createInstance() method does not play the effect. You must call the startEffect() method on the returned effect instance.

This function is automatically called by the Effect.play() method.

Parâmetros

target:Object (default = null) — Object to animate with this effect.

Retorna
IEffectInstance — The effect instance object for the effect.
createInstances()método 
public function createInstances(targets:Array = null):Array

Takes an Array of target objects and invokes the createInstance() method on each target.

Parâmetros

targets:Array (default = null) — Array of objects to animate with this effect.

Retorna
Array — Array of effect instance objects, one per target, for the effect.
deleteInstance()método 
public function deleteInstance(instance:IEffectInstance):void

Removes event listeners from an instance and removes it from the list of instances.

Parâmetros

instance:IEffectInstance

end()método 
public function end(effectInstance:IEffectInstance = null):void

Interrupts an effect that is currently playing, and jumps immediately to the end of the effect. Calling this method invokes the EffectInstance.end() method.

The effect instance dispatches an effectEnd event when you call this method as part of ending the effect.

If you pass an effect instance as an argument, just that instance is interrupted. If no argument is passed in, all effect instances currently spawned from the effect are interrupted.

Parâmetros

effectInstance:IEffectInstance (default = null) — EffectInstance to terminate.

Veja também

getAffectedProperties()método 
public function getAffectedProperties():Array

Returns an Array of Strings, where each String is the name of a property that is changed by this effect. For exemplo, the Move effect returns an Array that contains "x" and "y".

Every subclass of Effect must implement this method. The method is used by the EffectManager to ensure that no two effects are trying to animate the same property of the same object at the same time.

Retorna
Array — An Array of Strings specifying the names of the properties modified by this effect.
pause()método 
public function pause():void

Pauses the effect until you call the resume() method.

play()método 
public function play(targets:Array = null, playReversedFromEnd:Boolean = false):Array

Begins playing the effect. You typically call the end() method before you call the play() method to ensure that any previous instance of the effect has ended before you start a new one.

All subclasses must implement this method.

Parâmetros

targets:Array (default = null) — Array of target objects on which to play this effect. If this parameter is specified, then the effect's targets property is not used.
 
playReversedFromEnd:Boolean (default = false) — If true, play the effect backwards.

Retorna
Array — Array of EffectInstance objects, one per target, for the effect.
resume()método 
public function resume():void

Resumes the effect after it has been paused by a call to the pause() method.

reverse()método 
public function reverse():void

Plays the effect in reverse, if the effect is currently playing, starting from the current position of the effect.

stop()método 
public function stop():void

Stops the effect, leaving the effect targets in their current state. Unlike a call to the pause() method, you cannot call the resume() method after calling the stop() method. However, you can call the play() method to restart the effect.

The effect instance dispatches an effectEnd event when you call this method as part of ending the effect.

For mask effects, the mask is not removed automatically when the effect is stopped. Running further mask effects on the same target(s) without first removing the mask may produce unexpected results.