WebAnimator

From Xojo Documentation

Class (inherits from WebControl)


New in 2010r5

Used in web applications to move, resize, rotate, scale and change the opacity of other controls at runtime. If the browser supports 2D and/or 3D hardware acceleration, then the WebAnimator will use that at runtime.

Events
AnimationComplete Closed Opening
Properties
ControlID fa-lock-32.png Name fa-lock-32.png XRotationSupported fa-lock-32.png
Enabled OpacitySupported fa-lock-32.png XSkewSupported fa-lock-32.png
Hardware2DSupported fa-lock-32.png Page fa-lock-32.png YRotationSupported fa-lock-32.png
Hardware3DSupported fa-lock-32.png Parent fa-lock-32.png YSkewSupported fa-lock-32.png
Motion ResizeSupported fa-lock-32.png ZRotationSupported fa-lock-32.png
MoveSupported fa-lock-32.png ScaleSupported fa-lock-32.png
Methods
AddKeyFrame Move RotateZ
AddNextKeyFrame Opacity Scale
Close Play SkewX
ExecuteJavaScript Resize SkewY
GotoURL RotateX UpdateBrowser
KeyFrameTime RotateY

Notes

The animations themselves run locally in the web browser.

Animations do not start until you call the Play method.

To queue up multiple animations use KeyFrames in conjunction with the AddKeyFrame and AddNextKeyFrame methods.

An end-user does not see or interact with a WebAnimator control.

Sample Code

This code resizes a button when it is clicked:

Animator1.Resize(Me, 500, 500)
Animator1.Play

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)
Animator1.Move(Button1, Button1.Left, Button1.Top - 100, 1)
Animator1.Play

Example Projects

  • Example Projects/Web/Graphics/Animator/Animator

See Also

WebGraphics class; UserGuide:Web Animator topic