WebAnimator.AddKeyFrame

From Xojo Documentation

Method

WebAnimator.AddKeyFrame(AtSeconds As Double)

New in 2010r5

Supported for all project types and targets.

Inserts a KeyFrame at the moment specified by AtSeconds.

Notes

KeyFrames allow you to "queue" multiple animations in a single transaction with the server, without resorting to complicated Timer-based implementations. To do this, insert KeyFrames, then following calls to the animation functions (such as Move, Resize, etc) will occur at each KeyFrame.

Sample Code

This code moves a button down 100 pixels, then back up again over 2 seconds:

Animator1.Move(Button1, Button1.Left, Button1.Top + 100, 1)
Animator1.AddKeyFrame(1.0)
Animator1.Move(Button1, Button1.Left, Button1.Top - 100, 1)
Animator1.Play