Dear Bob,

This works like a charm!  Kudos to you and the rest of the devs for
putting together such a flexible system.  The only change necessary
(recorded here for the next person with this question) was a change to
the following:
  var nFrames = {1.0}.model.max
This presumably because {*}.model.max always gave nothing, since the
selection would contain more than one model.

Thanks for your help!
Matt Z.

On Thu, Aug 7, 2008 at 7:57 PM, Bob Hanson <[EMAIL PROTECTED]> wrote:
> Matt, no problem. You have the right idea, now just animate it yourself.
> For sure, do
>
> load files "xxxx" "yyyy"
> frame 0.0;display 1.1,2.1
>
> Now create the animation loop yourself. You could have a problem
> incrementing floating point numbers, so I would recommend instead:
>
> set echo echoBegin [50 50]
> echo [GO]
> set echo echoBegin script "!quit;doAnimate"
> background echo yellow
>
> set echo echoQuit [120 50]
> echo [QUIT]
> set echo echoQuit script "!quit"
> background echo yellow
> set debugscript
>
> function doAnimate()
>    var nFrames = {*}.model.max
>    for (var i = 1; i < nFrames; i = i + 1)
>      script inline "display 1." + i + ", 2." + i
>      delay 0.10
>      refresh
>    end for
> end function
>
>
> When that "quit" button is pressed, the animation will stop. You can
> have any sort of buttons -- (now images if you want!) -- just make sure
> that you have the ! there at the beginning. That tells Jmol to interrupt
> the currently running script and process the command.
>
> I bet you can build a nice animator using scripts and such right within
> the applet window now, with no JavaScript. Give it a try.
>
> Bob
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to