Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

ParallelAnimation

MikhailTymchukDX edited this page Apr 12, 2017 · 2 revisions

ParallelAnimation (inherits ParentAnimation)

The ParallelAnimation plays several animations simultaneously. It inherits from Sys.Extended.UI.Animation.ParentAnimation, but makes itself the owner of all its child animations to allow the use a single timer and syncrhonization mechanisms shared with all the children (in other words, the duration properties of any child animations are ignored in favor of the parent's duration). It is very useful in creating sophisticated effects through combination of simpler animations.

Client methods

Name Description
add(animation) Add an animation as a child of this animation and make ourselves its owner.
constructor(target, duration, fps, animations)
onEnd() Finish playing all of the child animations.
onStart() Get the child animations ready to play.
onStart(percentage) Progress the child animations through each frame.

Client methods

add(animation)

Add an animation as a child of this animation and make ourselves its owner.

Params:

  • animation
    • Type: Object
    • Description: Child animation to add.

constructor(target, duration, fps, animations)

Params:

  • target

    • Type: Object
    • Description: Target of the animation.
  • duration

    • Type: Number
    • Description: Length of the animation in seconds. The default is 1.
  • fps

    • Type: Number
    • Description: Number of steps per second. The default is 25.
  • animations

    • Type: Object
    • Description: Array of child animations.

onEnd()

Finish playing all of the child animations.

onStart()

Get the child animations ready to play.

onStart(percentage)

Progress the child animations through each frame.

Params:

  • percentage
    • Type: Number
    • Description: Percentage of the animation already complete.
Clone this wiki locally