패키지 | mx.effects |
인터페이스 | public interface IEffect extends IAbstractEffect , IEventDispatcher |
구현자 | Effect |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
관련 API 요소
속성 | 정의 주체 | ||
---|---|---|---|
className : String [읽기 전용]
The name of the effect class, such as "Fade". | IEffect | ||
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. | IEffect | ||
duration : Number
Duration of the effect in milliseconds. | IEffect | ||
effectTargetHost : mx.effects: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 | ||
isPlaying : Boolean [읽기 전용]
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 | ||
playheadTime : Number
Current time position 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 | ||
target : Object
The object to which this effect is applied. | IEffect | ||
targets : Array
An Array of 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 |
메서드 | 정의 주체 | ||
---|---|---|---|
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다. | 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
Flex uses this function 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 | ||
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 | ||
이벤트를 이벤트 흐름으로 전달합니다. | IEventDispatcher | ||
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 changed by this effect. | IEffect | ||
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다. | IEventDispatcher | ||
Pauses the effect until you call the resume() method. | IEffect | ||
Begins playing the effect. | IEffect | ||
EventDispatcher 객체에서 리스너를 제거합니다. | 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 | ||
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다. | IEventDispatcher |
className | 속성 |
className:String
[읽기 전용] 언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
구현
public function get className():String
customFilter | 속성 |
customFilter:mx.effects:EffectTargetFilter
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
기본값: null.
구현
public function get customFilter():mx.effects:EffectTargetFilter
public function set customFilter(value:mx.effects:EffectTargetFilter):void
관련 API 요소
duration | 속성 |
duration:Number
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
기본값: 500.
구현
public function get duration():Number
public function set duration(value:Number):void
effectTargetHost | 속성 |
effectTargetHost:mx.effects:IEffectTargetHost
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
구현
public function get effectTargetHost():mx.effects:IEffectTargetHost
public function set effectTargetHost(value:mx.effects:IEffectTargetHost):void
filter | 속성 |
filter:String
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
기본값: null.
구현
public function get filter():String
public function set filter(value:String):void
hideFocusRing | 속성 |
hideFocusRing:Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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
.
구현
public function get hideFocusRing():Boolean
public function set hideFocusRing(value:Boolean):void
isPlaying | 속성 |
perElementOffset | 속성 |
perElementOffset:Number
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
구현
public function get perElementOffset():Number
public function set perElementOffset(value:Number):void
playheadTime | 속성 |
playheadTime:Number
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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
.
구현
public function get playheadTime():Number
public function set playheadTime(value:Number):void
relevantProperties | 속성 |
relevantProperties:Array
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
구현
public function get relevantProperties():Array
public function set relevantProperties(value:Array):void
relevantStyles | 속성 |
relevantStyles:Array
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
구현
public function get relevantStyles():Array
public function set relevantStyles(value:Array):void
target | 속성 |
target:Object
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
구현
public function get target():Object
public function set target(value:Object):void
targets | 속성 |
targets:Array
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
구현
public function get targets():Array
public function set targets(value:Array):void
triggerEvent | 속성 |
triggerEvent:Event
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
구현
public function get triggerEvent():Event
public function set triggerEvent(value:Event):void
captureEndValues | () | 메서드 |
public function captureEndValues():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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 | () | 메서드 |
public function captureMoreStartValues(targets:Array):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
매개 변수
targets:Array — Array of targets for which values are captured
|
captureStartValues | () | 메서드 |
public function captureStartValues():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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 | () | 메서드 |
public function createInstance(target:Object = null):IEffectInstance
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
매개 변수
target:Object (default = null ) — Object to animate with this effect.
|
IEffectInstance — The effect instance object for the effect.
|
createInstances | () | 메서드 |
public function createInstances(targets:Array = null):Array
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Takes an Array of target objects and invokes the
createInstance()
method on each target.
매개 변수
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 | () | 메서드 |
public function deleteInstance(instance:IEffectInstance):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Removes event listeners from an instance and removes it from the list of instances.
매개 변수
instance:IEffectInstance — The effect instance.
|
end | () | 메서드 |
public function end(effectInstance:IEffectInstance = null):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
매개 변수
effectInstance:IEffectInstance (default = null ) — EffectInstance to terminate.
|
관련 API 요소
getAffectedProperties | () | 메서드 |
public function getAffectedProperties():Array
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
반환값Array — An Array of Strings specifying the names of the
properties modified by this effect.
|
pause | () | 메서드 |
public function pause():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Pauses the effect until you call the resume()
method.
play | () | 메서드 |
public function play(targets:Array = null, playReversedFromEnd:Boolean = false):Array
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
매개 변수
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 | () | 메서드 |
public function resume():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Resumes the effect after it has been paused
by a call to the pause()
method.
reverse | () | 메서드 |
public function reverse():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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 | () | 메서드 |
public function stop():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | 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.
Tue Jun 12 2018, 03:17 PM Z