| Package | flare.animate |
| Class | public class FunctionSequence |
| Inheritance | FunctionSequence Sequence Transition flash.events.EventDispatcher |
Function sequences are useful for ensuring a particular function is run before a sub-transition begins. For example, the function may populate the values of a Transitioner on the fly, or may be used to control other variables or side-effects that affect the subsequent sub-transition(s).
| Property | Defined by | ||
|---|---|---|---|
![]() | autoDuration : Boolean
If true, the duration of this sequence is automatically determined
by the durations of each sub-transition.
| Sequence | |
![]() | DEFAULT_EASING : Function [static] Default easing function: a cubic slow-in slow-out.
| Transition | |
![]() | delay : Number The delay between a call to play and the actual start
of the transition, in seconds.
| Transition | |
![]() | duration : Number The duration (length) of this Transition, in seconds.
| Sequence | |
![]() | easing : Function Easing function used to pace this Transition.
| Transition | |
![]() | enabled : Boolean = true Flag indicating if step events should be processed.
| Transition | |
![]() | id : String A unique name identifying this schedulable object.
| Transition | |
| offsetStartTime : Boolean Flag indicating if extra time should be added to the transition to
offset the running time of invoked functions.
| FunctionSequence | ||
![]() | progress : Number Fraction between 0 and 1 indicating the current progress
of this transition.
| Transition | |
![]() | reverse : Boolean Indicates if this Transition is running in reverse.
| Transition | |
![]() | running : Boolean Indicates if this Transition is currently running.
| Transition | |
![]() | totalDuration : Number The total duration, including both delay and active duration.
| Transition | |
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new FunctionSequence transition.
| FunctionSequence | ||
|
add(t:Transition):void
Adds a new transition to the end of this sequence.
| FunctionSequence | ||
![]() |
cancelled():void
Informs this transition that it was cancelled by the scheduler.
| Transition | |
|
dispose():void
Disposes of this transition, freeing up any resources held.
| FunctionSequence | ||
![]() |
evaluate(time:Number):Boolean
Evaluates the Transition, stepping the transition forward.
| Transition | |
![]() |
pause():void
Pauses the transition at its current position.
| Transition | |
|
play(reverse:Boolean = false):void
Plays this function sequence.
| FunctionSequence | ||
|
push(f:Function, t:*):void
Adds a function call and corresponding transition to this sequence.
| FunctionSequence | ||
|
remove(t:Transition):Boolean
Removes a sub-transition from this sequence.
| FunctionSequence | ||
|
removeFunction(f:Function):Boolean
Removes a sub-transition function from this sequence.
| FunctionSequence | ||
![]() |
reset():void
Resets the transition, so that any cached starting values are
cleared and reset the next time this transition is played.
| Transition | |
|
step(ef:Number):void
Steps this sequence transition, ensuring that any sub-transitions
between the previous and current progress fraction are properly
invoked.
| FunctionSequence | ||
![]() |
stop():void
Stops the transition and completes it.
| Transition | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
computeDuration():void
Computes the duration of this sequence transition.
| Sequence | |
![]() |
end():void
Ends this sequence transition, ending the last transition to be
played in the sequence as necessary.
| Sequence | |
|
setup():void
Sets up each sub-transition.
| FunctionSequence | ||
|
start():void
Starts this sequence transition, starting the first sub-transition
to be played.
| FunctionSequence | ||
| offsetStartTime | property |
offsetStartTime:Boolean [read-write]Flag indicating if extra time should be added to the transition to offset the running time of invoked functions. True by default.
Implementation public function get offsetStartTime():Boolean
public function set offsetStartTime(value:Boolean):void
| FunctionSequence | () | constructor |
public function FunctionSequence()Creates a new FunctionSequence transition.
| add | () | method |
public override function add(t:Transition):voidAdds a new transition to the end of this sequence.
Parameterst:Transition — the transition to add
|
| dispose | () | method |
public override function dispose():voidDisposes of this transition, freeing up any resources held. This method is optional, but calling it when a transition is no longer needed can help improve overall performance.
| play | () | method |
public override function play(reverse:Boolean = false):voidPlays this function sequence. Function sequences can not be played in reverse.
Parametersreverse:Boolean (default = false) — If true, an error will be thrown and the sequence
will not play.
|
| push | () | method |
public function push(f:Function, t:*):voidAdds a function call and corresponding transition to this sequence. As the sequence plays, functions will be called at the beginning of their subsequence, with the provided transition passed as the function's sole argument.
Parametersf:Function — a function to call at the beginning of a sub-sequence
|
|
t:* — the transition to run after the function call. This
transition will be passed in as an input to the function. This
value should be either a Transition instance or
a number indicating the duration for a new
Transitioner.
|
| remove | () | method |
public override function remove(t:Transition):BooleanRemoves a sub-transition from this sequence. Any corresponding function will also be removed.
Parameterst:Transition — the transition to remove
|
Boolean — true if the transition was found and removed, false
otherwise
|
| removeFunction | () | method |
public function removeFunction(f:Function):BooleanRemoves a sub-transition function from this sequence. The corresponding transition instance will also be removed.
Parametersf:Function — the transition to remove
|
Boolean — true if the transition was found and removed, false
otherwise
|
| setup | () | method |
protected override function setup():voidSets up each sub-transition.
| start | () | method |
protected override function start():voidStarts this sequence transition, starting the first sub-transition to be played.
| step | () | method |
public override function step(ef:Number):voidSteps this sequence transition, ensuring that any sub-transitions between the previous and current progress fraction are properly invoked.
Parametersef:Number — the current progress fraction.
|