Design to handle the setting and playing of hints
_done
[cancelled=false]
Internal callback when a hint is done playing
[cancelled=false]
Boolean
optional
If the function was interrupted by the user or something else.
_update
elapsed
Handle the update function
elapsed
Int
Number of milliseconds since the last update
anim
instance
events
onComplete
[onCancel]
Add an animator hint to the player
instance
createjs.MovieClip |
The instance of the clip to play with Animator
events
String | Array | Object
The event aliases to play, see Animator.play
onComplete
Function
Call when the VO is done playing
[onCancel]
Function | Boolean
optional
Call when the VO is cancelled playing, a value of true sets onComplete to also be the onCancelled callback.
The newly added hint
func
onStart
Add an animator hint to the player. If you use this hinting method, you NEED to re-enable the hinting when it's done. Whereas the VO and ANIM methods with automatically re-enable the hinting button.
onStart
Function
The function to call when hint is played. Should accept 2 arguments (callbacks): onComplete, onCancelled and call them when complete or cancelled
The newly added hint
funcDone
[cancelled=false]
Call this when a FunctionHint is done playing to reset HintsPlayer
[cancelled=false]
Boolean
optional
If the function was interrupted by the user or something else.
group
Create the new group hint for randomizing hints or for tiered hinting. You can save this group hint for later and assign using HintsPlayer.set()
The new group hint
play
Manually play the current hint
instance of the player for chaining
removeTimer
Stop the timer and remove update listener. Alias for stopTimer
instance of the player for chaining
resetTimer
Reset the timer to start over
instance of the player for chaining
set
hint
Set the current method to use
hint
springroll.AbstractHint
The new hint to add
Instance of the player, for chaining
startTimer
[duration=12000]
Start a timer
[duration=12000]
Int
optional
The number of milliseconds before playing hint
instance of the player for chaining
stopTimer
Stop the timer and remove update listener
instance of the player for chaining
vo
idOrList
onComplete
[onCancel]
Add a VO hint to the player.
The newly added hint
_oldHints
Contains previously set hints to be cleaned up after the new hint plays, to prevent erasing callbacks too soon.
enabled
Event when the enabled status of the hint changes
enabled
Boolean
If the player is enabled