AnimationKit.FrameTarget
Interface Methods
Sub AnimationStep (Identifier As Text, Frame As AnimationKit.Frame)
This method is fired as often as necessary to run the animation, providing both the identifier and the new frame.
Example Class
This is a very simple class that will display each frame given to it.
Sub Paint (g As Graphics, areas() As REALbasic.Rect)
If Self.CurrentFrame <> Nil Then
G.DrawPicture(Self.CurrentFrame.Image, 0, 0)
End If
End Sub
Sub AnimationStep (Identifier As Text, Frame As AnimationKit.Frame)
// Part of the AnimationKit.FrameTarget interface.
Self.CurrentFrame = Frame
Self.Invalidate(Self.EraseBackground)
End Sub
Private CurrentFrame As AnimationKit.Frame
See Also
AnimationKit.Frame, AnimationKit.FrameSet, AnimationKit.FrameTask