Package | feathers.motion.effectClasses |
Interface | public interface IEffectContext extends IFeathersEventDispatcher |
Implementors | BaseEffectContext, ParallelEffectContext, SequenceEffectContext, TweenEffectContext |
Product Version : | Feathers 3.5.0 |
See also
Property | Defined By | ||
---|---|---|---|
duration : Number [read-only]
The duration of the effect, in seconds. | IEffectContext | ||
position : Number
The position of the effect, from 0 to 1. | IEffectContext | ||
target : DisplayObject [read-only]
The target of the effect. | IEffectContext |
Method | Defined By | ||
---|---|---|---|
addEventListener(type:String, listener:Function):void
Adds a listener for an event type. | IFeathersEventDispatcher | ||
dispatchEvent(event:Event):void
Dispatches an event to all listeners added for the specified event type. | IFeathersEventDispatcher | ||
dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void
Dispatches an event from the pool with the specified to all listeners
for the specified event type. | IFeathersEventDispatcher | ||
hasEventListener(type:String, listener:Function = null):Boolean
Checks if a listener has been added for the specified event type. | IFeathersEventDispatcher | ||
interrupt():void
Interrupts the playing effect, but the effect context will be allowed
to determine on its own if it should call stop() or
toEnd(). | IEffectContext | ||
pause():void
Pauses an effect that is currently playing. | IEffectContext | ||
play():void
Starts playing the effect from its current position to the end. | IEffectContext | ||
playReverse():void
Starts playing the effect from its current position back to the
beginning (completing at a position of 0). | IEffectContext | ||
removeEventListener(type:String, listener:Function):void
Removes a listener for an event type. | IFeathersEventDispatcher | ||
removeEventListeners(type:String = null):void
Removes all listeners for an event type. | IFeathersEventDispatcher | ||
stop():void
Stops the effect at its current position and forces
Event.COMPLETE to dispatch. | IEffectContext | ||
toEnd():void
Advances the effect to the end and forces
Event.COMPLETE to dispatch. | IEffectContext |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when the effect completes or is interrupted. | IEffectContext |
duration | property |
duration:Number
[read-only] The duration of the effect, in seconds.
public function get duration():Number
position | property |
position:Number
The position of the effect, from 0
to 1
.
public function get position():Number
public function set position(value:Number):void
See also
target | property |
target:DisplayObject
[read-only] The target of the effect.
public function get target():DisplayObject
interrupt | () | method |
public function interrupt():void
Interrupts the playing effect, but the effect context will be allowed
to determine on its own if it should call stop()
or
toEnd()
.
See also
pause | () | method |
public function pause():void
Pauses an effect that is currently playing.
play | () | method |
public function play():void
Starts playing the effect from its current position to the end.
See also
playReverse | () | method |
public function playReverse():void
Starts playing the effect from its current position back to the
beginning (completing at a position of 0
).
stop | () | method |
public function stop():void
Stops the effect at its current position and forces
Event.COMPLETE
to dispatch. The data
property of the event will be true
.
See also
toEnd | () | method |
public function toEnd():void
Advances the effect to the end and forces
Event.COMPLETE
to dispatch. The data
property of the event will be false
.
See also
complete | Event |
starling.events.Event
starling.events.Event.COMPLETE
Dispatched when the effect completes or is interrupted. If the effect was
stopped instead of advancing to the end, the value of the event's
data
property will be true
.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | 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 . |
data | If the effect was stopped without
reaching the end, this value will be true . Otherwise,
false . |
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. |