(Formerly known as AnimateButton, which is now obsolete)
Button.Animate(int view, int loop, int delay, RepeatStyle)
Animates a GUI button by playing the specified view loop on it. This could be
useful for Sierra-style death animations and other effects.
LOOP from VIEW will be played on the button. The DELAY specifies the speed of
the animation - larger numbers are slower. This has the same values you use
with the Character.Animate and Object.Animate commands.
REPEAT determines whether the animation will loop repeatedly, or just play once and stop
with the last frame showing (eOnce or eRepeat are the possible values).
You can abort an animation at any time by setting the button's NormalGraphic property, or
starting a new animation on the same button.
NOTE: This command destroys the button's normal, pushed and mouseover images. If you
want to return the button to normal usage after playing an animation, you will have to set
the Graphic properties to restore the images.
NOTE: This command does not support flipped view frames. Any frames marked as "Flipped"
will in fact be drawn normally when on a button.
Example:
btnDeathAnim.Animate(6, 2, 4, eRepeat);
will animate the 'btnDeathAnim' button using loop 2 of view 6, with a delay of 4
cycles per frame, and repeat the animation continually.
See Also: Button.NormalGraphic
|