method Dialog.Play (AgentFile as Variant, [Gesture as Variant], [Options as Variant])
Plays a gesture/animation from giving agent file.

TypeDescription
AgentFile as Variant A String expression that specifies the ACS or ACF file to be loaded. Microsoft Agent characters are stored in files of the .ACS extension, and can be stored in a number of compressed .ACF files for better World Wide Web distribution.
Gesture as Variant A String expression that defines the name of the gesture to play, or a list of gestures to be played. The Gesture parameter supports patterns with wild characters. The space character splits multiple patterns. The Gesture may include a pattern with wild characters as *,?,# or []. For instance, "*" specifies all gestures, while "S*" specifies all gestures that start with character S. Each ACS/ACF file provides its list of gestures.
Options as Variant A String expression that defines the options to play the gesture(s). The options are separated by comma characters. The option supports any of the following:
  • repeat, the gesture(s) plays contiguously.
  • speed=value, defines the speed to play the gesture/animation. The value is a positive float number. The 0 is the faster, while a bigger value specifies to play slower the animation. By default, the value is 10. 
  • size=value, defines the size of the gesture. The value is a positive float number. By default, value is 1, which makes the gesture to show its normal size.
  • stop, indicates that the Play method does not start playing.

For instance:

  • Play "Peedy.acs", "Show" loads the peedy.acs animation file, and starts playing the Show gesture. 
  • Play "Peedy.acs", "LookDown LookDownReturn" loads the peedy.acs animation file, and starts playing the LookDown gesture, and after the LookDown is finish, the LookDownReturn animation is played.
  • Play "Peedy.acs", "L*", "repeat" loads the peedy.acs animation file, and starts playing repeatedly all gestures that starts with L.
  • Play "Peedy.acs", "*", "repeat,size=2,speed=0" loads the peedy.acs animation file, and starts playing repeatedly all gestures, as fast as possible, and showing double the pictures.
  • Play "Peedy.acs","*","stop" gets the list of all gestures in the peedy.acs file. The stop indicates that the animation is not started. 
ReturnDescription
VariantA String expression that defines the list of gestures to be played separated by comma character. For instance, the Play("peedy.acs","*","stop") gets the list of all gestures in the peedy.acs file.

The Play method plays a gesture or a list of gestures from giving file. The Play method returns the list of gestures to be played. The Play method starts playing the gestures, if any, while the "stop" option is not included in the Options parameter. Use the Stop method to stop playing the current gesture. Use the Continue method to continue playing the current gesture. Use the Replay method to start re-playing the gesture(s) from the beginning. The Picture property is changed periodically when a new frame from the current gesture is shown. The PictureChanged event notifies once the Picture property is changed. Use the Enabled property to show or hide the agent/assistant control. Use the Transparency property to specify whether the picture is shown using transparent colors. By default, the transparent color of the animation is defined by the ACS/ACF file, but you can use the TransparentFrom and TransparentTo properties to define the new transparent colors. The Play method has no effect if the Attach method is not called.

By default, the transparent color of the animation is defined by the ACS/ACF file, but you can use the TransparentFrom and TransparentTo properties to define the new transparent colors.