Paket | mx.effects |
Sınıf | public class Effect |
Miras Alma | Effect EventDispatcher Object |
Uygular | IEffect |
Alt Sınıflar | AddAction, AddChildAction, AddItemAction, Animate, CallAction, CompositeEffect, MaskEffect, RemoveAction, RemoveChildAction, RemoveItemAction, SetAction, SetPropertyAction, SetStyleAction, SoundEffect, TweenEffect, UnconstrainItemAction |
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
You do not create an instance of the Effect class itself in an application. Instead, you create an instance of one of the subclasses, such as Fade or WipeLeft.
MXML SözdizimiMXML Sözdizimini GizleThe Effect class defines the following properties, which all of its subclasses inherit:
<mx:tagname Properties customFilter="" duration="500" filter="" hideFocusRing="false" perElementOffset="0" repeatCount="1" repeatDelay="0" startDelay="0" suspendBackgroundProcessing="false|true" target="effect target" targets="array of effect targets" Events effectEnd="No default" efectStart="No default" />
İlgili API Öğeleri
Özellik | Tanımlayan: | ||
---|---|---|---|
className : String [salt okunur]
The name of the effect class, such as "Fade". | Effect | ||
constructor : Object
Belirli bir nesne örneği için sınıf nesnesine veya yapıcı işlevine bir başvuru. | Object | ||
customFilter : mx.effects:EffectTargetFilter
Specifies a custom filter object, of type EffectTargetFilter,
used by the effect to determine the targets
on which to play the effect. | Effect | ||
duration : Number
Duration of the effect in milliseconds. | Effect | ||
effectTargetHost : mx.effects:IEffectTargetHost
A property that lets you access the target list-based control
of a data effect. | Effect | ||
filter : String
Specifies an algorithm for filtering targets for an effect. | Effect | ||
hideFocusRing : Boolean
Determines whether the effect should hide the focus ring
when starting the effect. | Effect | ||
instanceClass : Class
An object of type Class that specifies the effect
instance class class for this effect class. | Effect | ||
isPlaying : Boolean [salt okunur]
A read-only flag which is true if any instances of the effect
are currently playing, and false if none are. | Effect | ||
perElementOffset : Number
Additional delay, in milliseconds, for effect targets
after the first target of the effect. | Effect | ||
playheadTime : Number
Current time position of the effect. | Effect | ||
relevantProperties : Array
An Array of property names to use when performing filtering. | Effect | ||
relevantStyles : Array
An Array of style names to use when performing filtering. | Effect | ||
repeatCount : int = 1
Number of times to repeat the effect. | Effect | ||
repeatDelay : int = 0
Amount of time, in milliseconds, to wait before repeating the effect. | Effect | ||
startDelay : int = 0
Amount of time, in milliseconds, to wait before starting the effect. | Effect | ||
suspendBackgroundProcessing : Boolean = false
If true, blocks all background processing
while the effect is playing. | Effect | ||
target : Object
The object to which this effect is applied. | Effect | ||
targets : Array
An Array of objects that are targets for the effect. | Effect | ||
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. | Effect |
Özellik | Tanımlayan: | ||
---|---|---|---|
applyTransitionEndProperties : Boolean
This flag controls whether the effect, when run in a transition,
automatically applies the property values according to the end
state, as opposed to leaving values as set by the effect itself. | Effect | ||
endValuesCaptured : Boolean = false
A flag containing true if the end values
of an effect have already been determined,
or false if they should be acquired from the
current properties of the effect targets when the effect runs. | Effect |
Yöntem | Tanımlayan: | ||
---|---|---|---|
Constructor. | Effect | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
EventDispatcher nesnesi olan bir olay dinleyici nesnesini, dinleyicinin bir olayın bildirimini alması için kaydeder. | EventDispatcher | ||
Captures the current values of the relevant properties
on the effect's targets and saves them as end values. | Effect | ||
Captures the current values of the relevant properties
of an additional set of targets
Flex uses this function when a data change
effect is run.
| Effect | ||
Captures the current values of the relevant properties
on the effect's targets. | Effect | ||
Creates a single effect instance and initializes it. | Effect | ||
Takes an Array of target objects and invokes the
createInstance() method on each target. | Effect | ||
Removes event listeners from an instance
and removes it from the list of instances. | Effect | ||
Olay akışına bir olay gönderir. | EventDispatcher | ||
Interrupts an effect that is currently playing,
and jumps immediately to the end of the effect. | Effect | ||
Returns an Array of Strings, where each String is the name
of a property changed by this effect. | Effect | ||
EventDispatcher nesnesinin belirli bir olay türü için kayıtlı dinleyicisi olup olmadığını kontrol eder. | EventDispatcher | ||
Bir nesnenin belirli bir özelliğinin tanımlı olup olmadığını gösterir. | Object | ||
Object sınıfının bir örneğinin parametre olarak belirtilen nesnenin prototip zincirinde olup olmadığını gösterir. | Object | ||
Pauses the effect until you call the resume() method. | Effect | ||
Begins playing the effect. | Effect | ||
Belirtilen özelliğin bulunup bulunmadığını ve numaralandırılabilir olup olmadığını gösterir. | Object | ||
EventDispatcher nesnesinden bir dinleyiciyi kaldırır. | EventDispatcher | ||
Resumes the effect after it has been paused
by a call to the pause() method. | Effect | ||
Plays the effect in reverse, if the effect is currently playing,
starting from the current position of the effect. | Effect | ||
Dinamik bir özelliğin döngü işlemlerinde kullanılabilirliğini ayarlar. | Object | ||
Stops the effect, leaving the effect targets in their current state. | Effect | ||
Bu nesnenin, yerel ayara özel kurallara göre biçimlendirilmiş dize temsilini döndürür. | Object | ||
Belirtilen nesnenin dize olarak temsil edilen halini döndürür. | Object | ||
Belirtilen nesnenin temel değerini döndürür. | Object | ||
Bir olay dinleyicisinin bu EventDispatcher nesnesiyle mi, yoksa onun belirtilen olay türüne yönelik üst öğelerinden biriyle mi kayıtlı olduğunu kontrol eder. | EventDispatcher |
Yöntem | Tanımlayan: | ||
---|---|---|---|
Used internally by the Effect infrastructure. | Effect | ||
Called when an effect instance has finished playing. | Effect | ||
This method is called when the effect instance starts playing. | Effect | ||
Called when an effect instance has stopped by a call
to the stop() method. | Effect | ||
Determines the logic for filtering out an effect instance. | Effect | ||
Called by the captureStartValues() method to get the value
of a property from the target. | Effect | ||
Copies properties of the effect to the effect instance. | Effect |
Olay | Özet | Tanımlayan: | ||
---|---|---|---|---|
[broadcast olayı] Flash Player veya AIR uygulaması işletim sistemi odağına gelip etkin olduğunda gönderilir. | EventDispatcher | |||
[broadcast olayı] Çalışan Flash Player veya AIR uygulaması sistem odağını kaybettiğinde ve etkin olmayan duruma geldiğinde gönderilir. | EventDispatcher | |||
Dispatched when one of the effect's instances finishes playing, either when the instance finishes playing or when the effect is interrupted by a call to the end() method. | Effect | |||
Dispatched when the effect starts playing. | Effect | |||
Dispatched when the effect has been stopped, which only occurs when the effect is interrupted by a call to the stop() method. | Effect |
applyTransitionEndProperties | özellik |
protected var applyTransitionEndProperties:Boolean
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
This flag controls whether the effect, when run in a transition, automatically applies the property values according to the end state, as opposed to leaving values as set by the effect itself.
Varsayılan değer şudur true.
className | özellik |
className:String
[salt okunur] Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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.
Uygulama
public function get className():String
customFilter | özellik |
customFilter:mx.effects:EffectTargetFilter
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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.
Uygulama
public function get customFilter():mx.effects:EffectTargetFilter
public function set customFilter(value:mx.effects:EffectTargetFilter):void
duration | özellik |
duration:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Duration of the effect in milliseconds.
In a Parallel or Sequence effect, the duration
property sets the duration of each effect.
For example, 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.
Uygulama
public function get duration():Number
public function set duration(value:Number):void
effectTargetHost | özellik |
effectTargetHost:mx.effects:IEffectTargetHost
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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.
Uygulama
public function get effectTargetHost():mx.effects:IEffectTargetHost
public function set effectTargetHost(value:mx.effects:IEffectTargetHost):void
endValuesCaptured | özellik |
protected var endValuesCaptured:Boolean = false
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
A flag containing true
if the end values
of an effect have already been determined,
or false
if they should be acquired from the
current properties of the effect targets when the effect runs.
This property is required by data effects because the sequence
of setting up the data effects, such as DefaultListEffect
and DefaultTileListEffect, is more complicated than for
normal effects.
Varsayılan değer şudur false.
filter | özellik |
filter:String
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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:
- A value of
"add"
plays the effect on any targets that are added as a child to a container. - A value of
"addItem"
plays the effect on the item renderer for any list items added to a List or TileList control. - A value of
"hide"
plays the effect on any targets whose visible property changed fromtrue
tofalse
. - A value of
"move"
plays the effect on any targets that changed theirx
ory
properties. - A value of
"remove"
plays the effect on any targets that are removed as a child of a container. - A value of
"removeItem"
plays the effect on the item renderer for any list items removed from a List or TileList control. - A value of
"replacedItem"
plays the effect on the item renderer for any list items replaced in a List or TileList control by a new item. - A value of
"replacementItem"
plays the effect on the item renderer for any list items added to a List or TileList control that replaces an existing item. - A value of
"resize"
plays the effect on any targets that changed theirwidth
orheight
properties. - A value of
"show"
plays the effect on any targets whose visible property changed fromfalse
totrue
. - A value of
""
specifies no filtering.
Uygulama
public function get filter():String
public function set filter(value:String):void
hideFocusRing | özellik |
hideFocusRing:Boolean
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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, 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
.
Uygulama
public function get hideFocusRing():Boolean
public function set hideFocusRing(value:Boolean):void
instanceClass | özellik |
public var instanceClass:Class
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
An object of type Class that specifies the effect instance class class for this effect class.
All subclasses of the Effect class must set this property in their constructor.
isPlaying | özellik |
perElementOffset | özellik |
perElementOffset:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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.
Uygulama
public function get perElementOffset():Number
public function set perElementOffset(value:Number):void
playheadTime | özellik |
playheadTime:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Current time position of the effect.
This property has a value between 0 and the total duration,
which includes the Effect's startDelay
,
repeatCount
, and repeatDelay
.
Uygulama
public function get playheadTime():Number
public function set playheadTime(value:Number):void
relevantProperties | özellik |
relevantProperties:Array
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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.
Uygulama
public function get relevantProperties():Array
public function set relevantProperties(value:Array):void
relevantStyles | özellik |
relevantStyles:Array
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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.
Uygulama
public function get relevantStyles():Array
public function set relevantStyles(value:Array):void
repeatCount | özellik |
public var repeatCount:int = 1
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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.
Varsayılan değer şudur 1.
repeatDelay | özellik |
public var repeatDelay:int = 0
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Amount of time, in milliseconds, to wait before repeating the effect. Possible values are any integer greater than or equal to 0.
Varsayılan değer şudur 0.
startDelay | özellik |
public var startDelay:int = 0
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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.
Varsayılan değer şudur 0.
suspendBackgroundProcessing | özellik |
public var suspendBackgroundProcessing:Boolean = false
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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:
- User input can arrive while the effect is playing, and the application must respond to the user input before the effect finishes playing.
- A response can arrive from the server while the effect is playing, and the application must process the response while the effect is still playing.
Varsayılan değer şudur false.
target | özellik |
target:Object
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
The 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.
Uygulama
public function get target():Object
public function set target(value:Object):void
targets | özellik |
targets:Array
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
An Array of 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.
Uygulama
public function get targets():Array
public function set targets(value:Array):void
triggerEvent | özellik |
triggerEvent:Event
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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.
Uygulama
public function get triggerEvent():Event
public function set triggerEvent(value:Event):void
Effect | () | Yapıcı |
public function Effect(target:Object = null)
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Constructor.
Starting an effect is usually a three-step process:
- Create an instance of the effect object
with the
new
operator. - Set properties on the effect object,
such as
duration
. - Call the
play()
method or assign the effect to a trigger.
target:Object (default = null ) — The Object to animate with this effect.
|
applyValueToTarget | () | yöntem |
protected function applyValueToTarget(target:Object, property:String, value:*, props:Object):void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Used internally by the Effect infrastructure.
If captureStartValues()
has been called,
then when Flex calls the play()
method, it uses this function
to set the targets back to the starting state.
The default behavior is to take the value captured
using the getValueFromTarget()
method
and set it directly on the target's property. For example:
target[property] = value;
Only override this method if you need to apply
the captured values in a different way.
Note that style properties of a target are set
using a different mechanism.
Use the relevantStyles
property to specify
which style properties to capture and apply.
Parametreler
target:Object — The effect target.
| |
property:String — The target property.
| |
value:* — The value of the property.
| |
props:Object — Array of Objects, where each Array element contains a
start and end Object
for the properties that the effect is monitoring.
|
captureEndValues | () | yöntem |
public function captureEndValues():void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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 | () | yöntem |
public function captureMoreStartValues(targets:Array):void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Captures the current values of the relevant properties of an additional set of targets
Flex uses this function when a data change effect is run.
Parametreler
targets:Array — Array of targets for which values are captured
|
captureStartValues | () | yöntem |
public function captureStartValues():void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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:
- Call the
captureStartValues()
method. The effect captures the starting effect values. - Make changes to your effect targets, such as adding/removing children, altering properties, changing location, or changing dimensions.
- Call the
play()
method. The effect captures the end values. This function populates theEffectInstance.propertyChanges
property for each effect instance created by this effect. Effect developers can use thepropertyChanges
property to retrieve the start and end values for their effect.
createInstance | () | yöntem |
public function createInstance(target:Object = null):IEffectInstance
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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.
Call the startEffect()
method
on the returned effect instance.
This function is automatically called by the
Effect.play()
method.
Parametreler
target:Object (default = null ) — Object to animate with this effect.
|
IEffectInstance — The effect instance object for the effect.
|
createInstances | () | yöntem |
public function createInstances(targets:Array = null):Array
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Takes an Array of target objects and invokes the
createInstance()
method on each target.
Parametreler
targets:Array (default = null ) — Array of objects to animate with this effect.
|
Array — Array of effect instance objects, one per target,
for the effect.
|
deleteInstance | () | yöntem |
public function deleteInstance(instance:IEffectInstance):void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Removes event listeners from an instance and removes it from the list of instances.
Parametreler
instance:IEffectInstance — The effect instance.
|
effectEndHandler | () | yöntem |
protected function effectEndHandler(event:EffectEvent):void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Called when an effect instance has finished playing. If you override this method, ensure that you call the super method.
Parametreler
event:EffectEvent — An event object of type EffectEvent.
|
effectStartHandler | () | yöntem |
protected function effectStartHandler(event:EffectEvent):void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
This method is called when the effect instance starts playing. If you override this method, ensure that you call the super method.
Parametreler
event:EffectEvent — An event object of type EffectEvent.
|
effectStopHandler | () | yöntem |
protected function effectStopHandler(event:EffectEvent):void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Called when an effect instance has stopped by a call
to the stop()
method.
If you override this method, ensure that you call the super method.
Parametreler
event:EffectEvent — An event object of type EffectEvent.
|
end | () | yöntem |
public function end(effectInstance:IEffectInstance = null):void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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.
Parametreler
effectInstance:IEffectInstance (default = null ) — EffectInstance to terminate.
|
filterInstance | () | yöntem |
protected function filterInstance(propChanges:Array, target:Object):Boolean
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Determines the logic for filtering out an effect instance. The CompositeEffect class overrides this method.
Parametreler
propChanges:Array — The properties modified by the effect.
| |
target:Object — The effect target.
|
Boolean — Returns true if the effect instance should play.
|
getAffectedProperties | () | yöntem |
public function getAffectedProperties():Array
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Returns an Array of Strings, where each String is the name
of a property changed by this effect.
For example, the Move effect returns an Array that contains
"x"
and "y"
.
Every subclass of Effect must implement this method. The EffectManager uses this method to ensure that no two effects are trying to animate the same property of the same object at the same time.
DöndürürArray — An Array of Strings specifying the names of the
properties modified by this effect.
|
getValueFromTarget | () | yöntem |
protected function getValueFromTarget(target:Object, property:String):*
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Called by the captureStartValues()
method to get the value
of a property from the target.
This function should only be called internally
by the effects framework.
The default behavior is to simply return target[property]
.
Effect developers can override this function
if you need a different behavior.
Parametreler
target:Object — The effect target.
| |
property:String — The target property.
|
* — The value of the target property.
|
initInstance | () | yöntem |
protected function initInstance(instance:IEffectInstance):void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Copies properties of the effect to the effect instance.
Flex calls this method from the Effect.createInstance()
method; you do not have to call it yourself.
When you create a custom effect, override this method to
copy properties from the Effect class to the effect instance class.
In your override, call super.initInstance()
.
Parametreler
instance:IEffectInstance — The effect instance to initialize.
|
pause | () | yöntem |
public function pause():void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Pauses the effect until you call the resume()
method.
play | () | yöntem |
public function play(targets:Array = null, playReversedFromEnd:Boolean = false):Array
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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.
Parametreler
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.
|
Array — Array of EffectInstance objects, one per target,
for the effect.
|
resume | () | yöntem |
public function resume():void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Resumes the effect after it has been paused
by a call to the pause()
method.
reverse | () | yöntem |
public function reverse():void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Plays the effect in reverse, if the effect is currently playing, starting from the current position of the effect.
stop | () | yöntem |
public function stop():void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
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 can produce unexpected results.
effectEnd | Olay |
mx.events.EffectEvent
özellik EffectEvent.type =
mx.events.EffectEvent.EFFECT_END
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Dispatched when one of the effect's instances finishes playing,
either when the instance finishes playing or when the effect
is interrupted by a call to the end()
method.
EffectEvent.EFFECT_END
constant defines the value of the
type
property of the event object for an
effectEnd
event.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
effectInstance | The effect instance object for the event. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
effectStart | Olay |
mx.events.EffectEvent
özellik EffectEvent.type =
mx.events.EffectEvent.EFFECT_START
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Dispatched when the effect starts playing.
TheEffectEvent.EFFECT_START
constant defines the value of the
type
property of the event object for an
effectStart
event.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
effectInstance | The effect instance object for the event. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
effectStop | Olay |
mx.events.EffectEvent
özellik EffectEvent.type =
mx.events.EffectEvent.EFFECT_STOP
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Dispatched when the effect has been stopped,
which only occurs when the effect is
interrupted by a call to the stop()
method.
The EFFECT_END event is also dispatched to indicate that
the effect has ended. This extra event is sent first, as an
indicator to listeners that the effect did not reach its
end state.
EffectEvent.EFFECT_STOP
constant defines the value of the
type
property of the event object for an
effectStop
event.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
effectInstance | The effect instance object for the event. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
<?xml version="1.0"?> <!-- Simple example to demonstrate the Effect class. --> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <fx:Script> <![CDATA[ import mx.controls.Alert; // Event handler for the effectEnd event. private function endEffectHandler():void { Alert.show("Effect Ended!"); } // Event handler for the reset button. private function resetHandler():void { expand.end(); img.width=30; img.height=60; button1.enabled=true; } ]]> </fx:Script> <fx:Declarations> <mx:Resize id="expand" target="{img}" widthTo="100" heightTo="200" duration="10000" effectEnd="endEffectHandler();"/> </fx:Declarations> <s:Panel title="Resize Effect Example" width="100%" height="100%" > <s:VGroup left="20" right="20" top="20" bottom="20"> <s:Label width="100%" color="blue" text="Use the Button controls to control the Resize effect."/> <mx:Image id="img" width="30" height="60" source="@Embed(source='assets/Nokia_6630.png')"/> <s:Button id="button1" label="Start" click="expand.play(); button1.enabled=false;"/> <s:Button label="Pause" click="expand.pause();"/> <s:Button label="Resume" click="expand.resume();"/> <s:Button label="Reverse" click="expand.reverse();"/> <s:Button label="End" click="expand.end();"/> <s:Button label="Reset" click="resetHandler();"/> </s:VGroup> </s:Panel> </s:Application>
Tue Jun 12 2018, 01:09 PM Z