Animation

[ Class ]

Allows you to create and configure animations that can be played using CSS or JavaScript.

Animation 1:

The Animation API is designed for use within controls.

Constructors

Name

Description

constructor

Creates a new animation

Functions

Name

Description

controlName

Returns the name of the control for which this animation was created.

selector

Returns the CSS selector used to create the animation.

animationName

Returns the name generated for this animation.

state

Returns the current state of the animation.

addKeyframe

Adds a keyframe.

addKeyframe

Adds a keyframe.

addKeyframe

Adds a keyframe.

clearKeyframes

Deletes all keyframes of this animation.

reverseKeyframes

Reverses the order in which the keyframes are played.

keyframes

Returns the keyframes of this animation.

duration

Returns the configured duration of the animation in milliseconds.

duration

Sets the duration in milliseconds that this animation should run.

delay

Returns the configured delay after which the animation should start in milliseconds.

delay

Sets the delay in milliseconds after which this animation should start.

iterationCount

Returns the configured number of repetitions the animation should run through.

iterationCount

Sets the number of repetitions the animation should run through.

direction

Returns the configured direction of the animation.

direction

Sets the direction of the animation.

timingFunction

Returns the configured timing function.

timingFunction

Sets the timing function of the animation.

fillMode

Returns whether the first keyframe should be effective before the start of the animation and/or the last keyframe after the end of the animation.

fillMode

Specifies whether the first keyframe should be effective before the start of the animation and/or the last keyframe after the end of the animation.

cleanup

Returns whether animation-specific CSS should be removed after the end of the animation.

cleanup

Sets whether animation-specific CSS should be removed after the end of the animation.

useCss

Returns whether the animation is played with CSS or JavaScript.

useCss

Sets whether, if possible, the animation should be played with CSS or JavaScript.

registerEventHandler

Registers a callback for an animation event.

unregisterEventHandler

Unregister a callback for an animation event.

eventHandlers

Returns all registered event handlers.

run

Starts or resumes the animation if paused.

pause

Pauses the animation.

skip

Skips the animation.

reset

Resets the animation to the first keyframe.

Interfaces

Name

Description

Keyframe

Defines the state of an animation at a certain point in time.

AnimationEvent

Contains information about events that occur during the course of an animation.

Enumerations

Name

Description

Status

Defines the states an animation can assume.

Animation 2:

Available from 1.8