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 Hidden MouseMove
Close KeyPressed MouseUp
ContextualMenuAction LostFocus Open
DoubleClick MouseDown Resized
DropObject MouseEnter Shown
GotFocus MouseExit


Properties
ContextualMenu LockHorizontal ScaleSupported fa-lock-32.png
ControlID fa-lock-32.png LockLeft Style
Cursor LockRight Top
DragOverStyle LockTop VerticalCenter
Enabled LockVertical Visible
Hardware2DSupported fa-lock-32.png Motion Width
Hardware3DSupported fa-lock-32.png MoveSupported fa-lock-32.png XRotationSupported fa-lock-32.png
Height Name fa-lock-32.png XSkewSupported fa-lock-32.png
HelpTag OpacitySupported fa-lock-32.png YRotationSupported fa-lock-32.png
HorizontalCenter Page fa-lock-32.png YSkewSupported fa-lock-32.png
Left Parent fa-lock-32.png ZRotationSupported fa-lock-32.png
LockBottom ResizeSupported fa-lock-32.png Zindex


Methods
AcceptPictureDrop ExecuteJavaScript RotateY
AcceptRawDataDrop KeyFrameTime RotateZ
AcceptTextDrop Move Scale
AddKeyFrame MsgBox SetFocus
AddNextKeyFrame Opacity ShowURL
AllowPictureDrag Play SkewX
AllowRawDataDrag PresentContextualMenu SkewY
AllowTextDrag Resize
Close RotateX

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.

Examples

This example resizes a button when it is clicked:

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

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

Example Projects

Example Projects/Web/Graphics/Animator/Animator

See Also

WebApplication