WebAnimator
From Xojo Documentation
Supported Platforms Project Types: Web Platforms: macOS, Windows, Linux |
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 | |||||||||||||||||
|
Methods | |||||||||||||||||||||||||
|
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
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
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