There are actually quite a few parameters returned by that callback:
function animFrameCallback(app,frame,fileno,modelno,firstno,lastno) {}
Looks like I need to add another indicating WHY the callback was made.
You will also need to know whether this frame was reached by someone
stepping or from a running animation.
Believe it or not, you can do this:
if(_modelNumber = 5);message is5;animframecallback="none";anim off;delay 2;anim
play;animframecallback="testanim";else;message not5;endif
That is, you turn off animation frame callback during the callback, and then
turn it on later!
But I'll be interested in how you solve the problem of someone stepping to the
frame and not suddenly starting to animate. I think you can do it with
variables. But I'll leave you with that challenge, Rick!
rspinney wrote:
>
>
>>You might try
>>
>>message (Step 1: protonate the alcohol); anim off; delay 5; anim play
>>
>>
>
>Duh. what can I say, I missed that one. This works with an interesting bug.
>I have the following:
>
> if (temp == 2) {document.slider1form.jmolApplet0.script("message (Step 1:
>protonate the alcohol); anim off; delay 2; anim resume;");
> }
> if (temp == 20) {document.slider1form.jmolApplet0.script("message (Step 2:
>the leaving group (water) leaves); anim off; delay 2; anim resume;");
> }
> if (temp == 30) {document.slider1form.jmolApplet0.script("message (Step 3:
>base abstracts a proton to form the alkene); anim off; delay 2; anim
>resume;");
> }
>
>The delays work and messages are changed, but each one is executed three
>times, i.e. the correct frame and the following two frames. Any ideas?
>
>Thanks, Rick
>
>
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>_______________________________________________
>Jmol-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users