sb.animationPause(animationID, data)
or
sb.animationPause("animation_name")
Pause a running animation. If an animationID is used to pause the animation, then it must be the return value from sb.animationCreate(). If a name is used to pause an animation, then that name must be the name of the animation specified in Designer. This function can take an optional parameter, data. The data parameter is an object that contains variables for the extra arguments to set.
Parameters: animationID The running animation to pause data An object containing the variables for the extra arguments to set the arguments are: id The animation id used in the case of multiple animations with the same name context The fully qualified name of an object in the model which will be used as the context for the animation
Example: function pauseAnimation(id) { //Pause the animation sb.animationPause(id); } //Example of using gre.animation_pause passing animation names. function cbPauseCur5day() { if(cur5dayToggle == false) { sb.animationPause("show_5day"); } else { sb.animationPause("hide_mon_to_fri"); } } //Example of using gre.animation_pause with context. function cb_pause_cur_5day() { var data = {}; data.context = "Layer1.mycontrol"; sb.animationPause("show_5day", data); }