This class contains a bunch of media playing class to provide convenience around using the Learning Dispatcher
aliasToString
alias
Get an alias or group of aliases as a string
The alias as string
playCorrectFeedback
[instance]
event
[onComplete]
[onCancel]
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);
[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.
AnimatorTimeline of the played animation, or nothing if VO only.
playIncorrectFeedback
[instance]
events
[onComplete]
[onCancel]
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);
[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.
AnimatorTimeline of the played animation, or nothing if VO only.
playInstruction
[instance]
event
[onComplete]
[onCancel]
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);
[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.
AnimatorTimeline of the played animation, or nothing if VO only.
playMovie
instance
events
[onComplete]
[onCancel]
Plays animation or list of animations using springroll.Animator, firing startMovie and endMovie or skipMovie Learning events.
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.
AnimatorTimeline of the played animation.
triggerMoviePlay
instance
events
options
learningEvent
Handles learning events for triggered Animator calls.
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").
AnimatorTimeline of animation.
triggerVOPlay
alias
learningStart
learningEnd
[onComplete]
[onCancel]
Generalized method for playing either feedback or instructions
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