API Documentation for: 2.3.1
Show:

CharacterController Class

Namespace: cloudkid

Character Controller class is designed to play animated sequences on the timeline. This is a flexible way to animate characters on a timeline

Methods

_animationComplete

() private

When the animation has completed playing

clear

()

Defined in clear:227

Clear any animations for the current character

destroy

()

Defined in destroy:245

Don't use after this

gotoFrameAndStop

(
  • event
)

If we want to play a static frame

Parameters:

  • event String

    The frame label to stop on

initialize

()

Defined in initialize:89

Initiliazes this Character controller

playClips

(
  • clips
  • callback
  • interruptable
  • cancelPreviousCallback
  • allowFrameDropping
)

Defined in playClips:130

Will play a sequence of animations

Parameters:

  • clips Array

    an array of CharacterClip objects

  • callback Function

    Callback for when the animations are either done, or have been interrupted. Will pass true is interrupted, false if they completed

  • interruptable Bool

    If calling this can interrupt the current animation(s)

  • cancelPreviousCallback Bool

    Cancel the callback the last time this was called

  • allowFrameDropping Bool

    If frame dropping is allowed for this frame, if the Animator is doing frame drop checks

setCharacter

(
  • character
)

Defined in setCharacter:99

Set the current character, setting to null clears character

Parameters:

  • character createjs.MovieClip

    MovieClip

startNext

()

Defined in startNext:173

Start the next animation in the sequence

Properties

_allowFrameDropping

Bool private

If frame dropping is allowed for this animation set

_animationStack

Array private

Defined in _animationStack:25

The current stack of animations to play

_callback

Function private

Defined in _callback:73

Callback function for playing animation

_character

createjs.MovieClip private

Defined in _character:65

The current character

_currentAnimation

CharacterClip private

The currently playing animation

_destroyed

Bool private

Defined in _destroyed:81

If this instance has been destroyed

_interruptable

Bool private

Defined in _interruptable:49

If the current animation choreographies can't be interrupted

_loops

Int private

Defined in _loops:41

Current number of loops for the current animation