WebAnimator.AddKeyFrame

From Xojo Documentation

Method

WebAnimator.AddKeyframe(AtSeconds As Integer)

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.

Example

This example would move a button down 100 pixels, then back up again over 2 seconds:

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