Stopping the Character

What do you do if you’re playing a long animation and don’t want to wait for it to finish? How about if you queue up a couple of individual animations, plus some text for the character to speak (as I did when I processed the “hello” command in Listing 14.6), and want to stop all of them? Using the StopAll method will cancel the current animation, plus all of the other animations that are in the queue. I used this method with the Click event of the Cancel button, as you can see in Listing 14.8.

Listing 14.8: Command1_Click Event in Agent Demo

Private Sub Command1_Click()
MyAgent.StopAll
End Sub

© 1998 SYBEX Inc. All rights reserved.