spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * GUI Button functions and properties

Animate (button)

(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


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.