springroll.pbskids.LearningMedia Class

This class contains a bunch of media playing class to provide convenience around using the Learning Dispatcher

aliasToString

(
  • alias
)
String
private

Defined in aliasToString:607

Get an alias or group of aliases as a string

Parameters:

Returns:

String:

The alias as string

destroy

()

Defined in destroy:664

Destroy and don't use after this

init

(
  • app
)

Defined in init:52

Intiailize the media

Parameters:

isPlaying

() Boolean

Defined in isPlaying:654

Whether or not VOPlayer or Animator are currently playing

Returns:

Boolean:

Whether or not VOPlayer or Animator are currently playing

playCorrectFeedback

(
  • [instance]
  • event
  • [onComplete]
  • [onCancel]
)
springroll.AnimatorTimeline | Undefined

Plays events/aliases using Animator or VOPlayer, and fires startCorrectFeedback and endCorrectFeedback Learning events

Example Animator usage: game.playCorrectFeedback(someMovieClip, {"anim":"frameLabel", "audio":"soundAlias"}, doneFunction, interruptedFunction);

Example VOPlayer usage: game.playCorrectFeedback("soundAlias", doneFunction, interruptedFunction);

Parameters:

  • [instance] MovieClip optional

    createjs.MovieClip instance to play with Animator. Omit this parameter to play alias(es) with VOPlayer instead

  • event String | Array | Object

    If 'instance' is omitted, Alias or Array of aliases for VO lines to play with VOPlayer. See VOPlayer.play docs for options. If 'instance' is present, Event or list of events to animate with createjs.Animator. See springroll.Animator.play() docs for options

  • [onComplete] Function optional

    VO/Animation Ended callback

  • [onCancel] Function | Boolean optional

    VO/Animation Cancelled (interrupted) callback. If set to 'true' (Boolean), will use same callback as 'onComplete'. If omited, no callback will be fired on interruption.

Returns:

springroll.AnimatorTimeline | Undefined:

AnimatorTimeline of the played animation, or nothing if VO only.

playIncorrectFeedback

(
  • [instance]
  • events
  • [onComplete]
  • [onCancel]
)
springroll.AnimatorTimeline | Undefined

Plays events/aliases using Animator or VOPlayer, and fires startIncorrectFeedback and endIncorrectFeedback Learning events

Example Animator usage: game.playIncorrectFeedback(someMovieClip, {"anim":"frameLabel", "audio":"soundAlias"}, doneFunction, interruptedFunction);

Example VOPlayer usage: game.playIncorrectFeedback("soundAlias", doneFunction, interruptedFunction);

Parameters:

  • [instance] MovieClip optional

    createjs.MovieClip instance to play with Animator. Omit this parameter to play alias(es) with VOPlayer instead

  • events String | Array | Object

    If 'instance' is omitted, Alias or Array of aliases for VO lines to play with VOPlayer. See VOPlayer.play docs for options. If 'instance' is present, Event or list of events to animate with createjs.Animator. See springroll.Animator.play() docs for options

  • [onComplete] Function optional

    VO/Animation Ended callback

  • [onCancel] Function | Boolean optional

    VO/Animation Cancelled (interrupted) callback. If set to 'true' (Boolean), will use same callback as 'onComplete' If omited, no callback will be fired on interruption.

Returns:

springroll.AnimatorTimeline | Undefined:

AnimatorTimeline of the played animation, or nothing if VO only.

playInstruction

(
  • [instance]
  • event
  • [onComplete]
  • [onCancel]
)
springroll.AnimatorTimeline | Undefined

Defined in playInstruction:140

Plays events/aliases using Animator or VOPlayer, and fires startInstruction and endInstruction Learning events

Example Animator usage: game.playInstruction(someMovieClip, {"anim":"frameLabel", "audio":"soundAlias"}, doneFunction, interruptedFunction);

Example VOPlayer usage: game.playInstruction("soundAlias", doneFunction, interruptedFunction);

Parameters:

  • [instance] MovieClip optional

    createjs.MovieClip instance to play with Animator. Omit this parameter to play alias(es) with VOPlayer instead

  • event String | Array | Object

    If 'instance' is omitted, Alias or Array of aliases for VO lines to play with VOPlayer. See VOPlayer.play docs for options. If 'instance' is present, Event or list of events to animate with createjs.Animator. See springroll.Animator.play() docs for options

  • [onComplete] Function optional

    VO/Animation Ended callback

  • [onCancel] Function | Boolean optional

    VO/Animation Cancelled (interrupted) callback. If set to 'true' (Boolean), will use same callback as 'onComplete' If omited, no callback will be fired on interruption.

Returns:

springroll.AnimatorTimeline | Undefined:

AnimatorTimeline of the played animation, or nothing if VO only.

playMovie

(
  • instance
  • events
  • [onComplete]
  • [onCancel]
)
springroll.AnimatorTimeline

Defined in playMovie:105

Plays animation or list of animations using springroll.Animator, firing startMovie and endMovie or skipMovie Learning events.

Parameters:

  • instance MovieClip

    The MovieClip to animate.

  • events String | Array | Object

    Event or list of events to animate. See springroll.Animator.play() docs for details.

  • [onComplete] Function optional

    VO/Animation Ended callback

  • [onCancel] Function | Boolean optional

    VO/Animation Cancelled (interrupted) callback. If set to 'true' (Boolean), will use same callback as 'onComplete' If omited, no callback will be fired on interruption.

Returns:

springroll.AnimatorTimeline:

AnimatorTimeline of the played animation.

stop

()

Defined in stop:638

Stops the currently playing animation or VO.

triggerMoviePlay

(
  • instance
  • events
  • options
  • learningEvent
)
springroll.AnimatorTimeline
protected

Handles learning events for triggered Animator calls.

Parameters:

  • instance MovieClip

    The MovieClip to animate.

  • events String | Array

    Event or list of events to animate. See springroll.Animator.play() docs for details.

  • options Object

    Additional options. See springroll.Animator.play() docs for details.

  • learningEvent String

    Learning VO/animation event type ("movie", "instruction", "incorrect", or "correct").

Returns:

springroll.AnimatorTimeline:

AnimatorTimeline of animation.

triggerVOPlay

(
  • alias
  • learningStart
  • learningEnd
  • [onComplete]
  • [onCancel]
)
protected

Defined in triggerVOPlay:365

Generalized method for playing either feedback or instructions

Parameters:

  • alias String | Array

    Alias or Array of aliases for VO lines to play

  • learningStart Function

    The learning to call while starting

  • learningEnd Function

    The learning call to call after finishing/canceling VO

  • [onComplete] Function optional

    VO Ended callback

  • [onCancel] Function optional

    VO Cancelled (interrupted) callback

animator

springroll.Animator

Defined in animator:42

Reference to the animator instance

display

createjs.Display

Defined in display:36

Reference to the main display

filters

springroll.StringFilters

Defined in filters:18

Reference to the StringFilters

learning

springroll.Learning

Defined in learning:24

Reference to the Learning Dispatcher

voPlayer

springroll.VOPlayer

Defined in voPlayer:30

Reference to the VO Player