WebAnimator.AddNextKeyFrame

From Xojo Documentation

Method

WebAnimator.AddNextKeyFrame(AdditionalSeconds As Integer)

New in 2010r5

Supported for all project types and targets.

Inserts a KeyFrame at AdditionalSeconds from the last KeyFrame inserted.

Example

This code "wiggles" an image:

LogoAnimator.Move(Image1, Image1.Left - 30, Image1.Top, 0.05)
LogoAnimator.AddNextKeyFrame(0.05)
LogoAnimator.Move(Image1, Image1.Left + 30, Image1.Top, 0.05)
LogoAnimator.AddNextKeyFrame(0.05)
LogoAnimator.Move(Image1, Image1.Left + 30, Image1.Top, 0.05)
LogoAnimator.AddNextKeyFrame(0.05)
LogoAnimator.Move(Image1, Image1.Left - 30, Image1.Top, 0.05)
LogoAnimator.AddNextKeyFrame(0.05)
LogoAnimator.Move(Image1, Image1.Left - 30, Image1.Top, 0.05)
LogoAnimator.AddNextKeyFrame(0.05)
LogoAnimator.Move(Image1, Image1.Left + 30, Image1.Top, 0.05)
LogoAnimator.AddNextKeyFrame(0.05)
LogoAnimator.Move(Image1, Image1.Left + 30, Image1.Top, 0.05)
LogoAnimator.AddNextKeyFrame(0.05)
LogoAnimator.Move(Image1, Image1.Left - 30, Image1.Top, 0.05)
LogoAnimator.Play