Thanks Angel, I tried using exit (and !exit) before the scripts but this does not stop animations from the previous script.
I put together a simplified example of what I’m trying to do here: https://dl.dropboxusercontent.com/u/530483/9jBxSgu3K7/jsmol/test/test.html Animation 1 by itself zooms in, highlights a bond, then zooms back out. Animation 2 adds some labels and highlights a bond. (The two script files being used are embedded on the page for reference.) If you click the button to start Animation 1, then click Animation 2 while it’s zooming, the zoom continues and both animations happen together. You can also see some weird behavior by clicking the same animation button repeatedly, almost like the scripted animation gets multiplied. Is there a way to completely clear animations in the queue and in progress? Or reset the jmolview applet somehow? I thought about using a separate applet for each animation, then show and hide each one, but in a tutorial with 15-20 different scenes I thought that might impact the performance. -Jeff > On Apr 11, 2017, at 2:34 PM, Angel Herráez <angel.herr...@uah.es> wrote: > > Hi Jeff > > That's a little strange. "exit" should do what you wish, at least according > to the documentation (I have no direct experience) > > I suggest that you try this: > > add > !exit > as the first line of your script files or the first command of your inline > scripts that are callled from buttons. > > Following your example, I would do this: > [1] scene is loaded with: > Jmol.script(jmolview1, '!exit; load model.pdb; script initial-view.spt;’); > > [2] clicking a play button begins the animation with: > Jmol.script(jmolview1, '!exit; load model.pdb; script animation.spt;’); > > [3] combined into [4]: > Jmol.script(jmolview1, '!exit; load model.pdb; script initial-view2.spt;’); > > > Let's see if that helps > > > > > Libre de virus. www.avast.com > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! > http://sdm.link/slashdot_______________________________________________ > Jmol-developers mailing list > Jmol-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-developers ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers