Web site add on
- MS Agents

Microsoft Internet Explorer MS Agents
"This web site uses Microsoft Agent technology"
Merlin, Genie, Peedy & Robby MS Agent Characters
- Copyright 1996  - 2004 Microsoft

This Javascript will add a Microsoft Agent to your web page. The default Agent is Merlin.
  ( The Ms Agent Core Components are already installed on Windows XP, 2000, and Me. )

Windows XP operating system
Microsoft Agent uses SAPI 4.0 to have it's agents speak. However, now, Windows XP is shipped with SAPI 5.0 which is not compatible with this, so your agents cannot speak. Thankfully, both SAPI 4.0 and 5.0 can be on your computer at the same time with no problems, so you need to install SAPI 4.0 before Agents can speak. Please download and install it from http://activex.microsoft.com/activex/controls/sapi/spchapi.exe
and then follow the next instructions.

• There are many Agents and those used at Rainbow Arch can be found here.
• Javascripts to add other Agents to your site are here.

Ms Agent Add On Instructions
Copy and paste into your HTML editor, then follow the editing instructions
after the // and within the <!--comment tags--> to customize the script.

Agent Control

Lets get started
Inside the code above find the section : // *** BEGIN CHARACTER SCRIPT ***
That is the code that controls what the character will do on screen.
You can change this to get your character to move and say things on screen.

What does all that code mean?
Char.MoveTo(900, 500);
Char.Speak("Hello, There");
Char.Think("I wonder what they said");

- This makes the character appear
- This moves character
- This plays a character animation
- The character will speak
- This plays a character animation
- This command will use the bubble to show the text
- This plays a character animation
- This makes the character disappear

Below is a more detailed description of the commands.

You use the speak command when you want your character to speak. It will say anything with in the quotes. Of course you need to have downloaded and installed the Text-to-Speech program to hear the Agent speak.
MSAgent.Speak ("Hello everyone");

This command will use the bubble to show the text.
MSAgent.Think ("I wonder what they said");

This command will move your character to the position specified in the MoveTo command.
MSAgent.MoveTo (300,150);

Using the play command the character will mimic what's in the quotes, below are some of the commands you can use with Play.
MSAgent.Play ("Congratulate");

Play (Actions)
  • MSAgent.Play "Write" -  The character writes and then stops
  • MSAgent.Play "Writing" - The character will continue writing until the stop command.
  • MSAgent.Play "Read" - The character reads a book and then stops.
  • MSAgent.Play "Reading" The character will continue reading until the stop command.
  • MSAgent.Play "Process" - Depending on the character, Merlin stirs the Kettle.
  • MSAgent.Play "Processing" - The character will continue processing until the stop command.
  • MSAgent.Play "Search" - The character looks like its searching for something
  • MSAgent.Play "Searching" - The character will continue searching until the stop command.
  • MSAgent.Play "Idle1_1" The character just stands there idle.

Play (Facial expressions)
These command will display facial expressions on the characters face.
  • MSAgent.Play "Acknowledge" - The character bows to acknowledge you.
  • MSAgent.Play "Blink" - The character blinks its eyes
  • MSAgent.Play "Confusd" - The character looks confused
  • MSAgent.Play "Sad" - The character looks sad
  • MSAgent.Play "Suprised" - The character looks suprised


All Agents come with standard animations, such as "show" or "hide".
For the Merlin character, the following animations exist:


Advance Users

At the end of the script you can find the code to control what happens when the Agent is clicked.
It has this code Char.StopAll(); which stops the character, then the rest is the same as above.


What are MS Agents | Install MS Agents | Downloads + Check | Fun Stuff | Meet the Agents