Judy, Jmol doesn't recognize single quotes the way many other languages do. So you need:
jmolApplet([180,180],"*set AnimFrameCallback \"graphe\";*load http://www.massey.ac.nz/~wwifs/jmol/123101/ethane.xyz <http://www.massey.ac.nz/%7Ewwifs/jmol/123101/ethane.xyz>; rotate z 0; select hydrogen; spacefill 111; select carbon; spacefill 231; select (atomno=4 or atomno=6); color labels red; label H; animation mode LOOP; anim on ; animation fps=2; ","vib"); I suspect that if you opened a Java window you would see some sort of error such as script compiler ERROR: unrecognized token: set animframecallback 'graphe' ---- set animframecallback >>>> 'graphe' <<< I also put the frame callback setting prior to loading, because that then starts the calling as soon as the animation on command fires. Otherwise you might miss the first frame. actually, I'm surprised it even loaded the file. You might want to look at some of the things Hens Borkent has done in relation to conformational changes--I use these in organic routinely. For example: ethane: http://wetche.cmbi.ru.nl/organic/nalkanesconf/ethane/jmindex.html propane: http://wetche.cmbi.ru.nl/organic/nalkanesconf/propane/jmproprot.html butane: http://wetche.cmbi.ru.nl/organic/nalkanesconf/butane/jmindex.html from http://wetche.cmbi.ru.nl/organic/nalkanesconf/index.html within http://wetche.cmbi.ru.nl/organic/subjmenu.html Bob Hanson Judy Edwards wrote: > Hi jmol users > > Have come a long way yesterday getting an animation working but come > unstuck when I try to use set AnimFrameCallback > > > The JMol applet moves beautifully but the image does not change as it > should. I think my reference to set AnimFrameCallback must be > wrong. But how and why?????? > > The body of my file contains: > > <script language="javascript">jmolSetAppletColor("#fff1e6"); > jmolApplet([180,180],"load > http://www.massey.ac.nz/~wwifs/jmol/123101/ethane.xyz > <http://www.massey.ac.nz/%7Ewwifs/jmol/123101/ethane.xyz>; rotate z 0; > select hydrogen; spacefill 111; select carbon; spacefill 231; select > (atomno=4 or atomno=6); color labels red; label H; animation mode > LOOP; anim on ; *set AnimFrameCallback 'graphe';* animation fps=2; > ","vib"); > </script><img src="ethaneenergy/E_f01.gif" name="grapheth" width="386" > height="224" align="ABSMIDDLE"> > > The function in the header is > > function *graphe(vib,frameno) > *{ > var ct=frameno-27; > if (ct <= 0) {ct = ct + 37}; > document.grapheth.src=p2[ct].src > } > > All help gratefully received. > > Thanks > > Judy > >------------------------------------------------------------------------ > >------------------------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. >Still grepping through log files to find problems? Stop. >Now Search log events and configuration files using AJAX and a browser. >Download your FREE copy of Splunk now >> http://get.splunk.com/ > >------------------------------------------------------------------------ > >_______________________________________________ >Jmol-users mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- Robert M. Hanson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

