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.Show();
Char.MoveTo(900, 500);
Char.Play("Announce");
Char.Speak("Hello, There");
Char.Play("Greet");
Char.Think("I wonder what they said");
Char.Play("Wave");
Char.Hide();

- 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



Commands
Below is a more detailed description of the commands.

Speak
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");

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

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

Play
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

Animations

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


("Acknowledge")
("Alert")
("Announce")
("Blink")
("Confused")
("Congratulate")
("Decline")
("DoMagic1")
("DoMagic2")
("DontRecognize")
("Explain")
("GestureDown")
("GestureLeft")
("GestureRight")
("GestureUp")
("GetAttention")
("GetAttentionContinued")
("GetAttentionReturn")
("Greet")
("Hide")
("Hearing_1")
("Hearing_2")
("Hearing_3")
("Idle1_1")
("Idle2_1")
("Idle1_4")
("Idle1_3")
("Idle1_2")
("Idle2_2")
("Idle3_1")
("Idle3_2")
("LookDown")
("LookDownBlink")
("LookDownReturn")
("LookDownLeft")
("LookDownLeftBlink")
("LookDownLeftReturn")
("LookRight")
("LookRightBlink")
("LookRightReturn")
("LookUp")
("LookUpBlink")
("LookUpReturn")
("LookUpLeft")
("LookUpLeftBlink")
("LookUpReturn")
("LookUpRight")
("LookUpRightBlink")
("LookUpRightReturn")
("MoveDown")
("MoveLeft")
("MoveRight")
("MoveUp")
("Pleased")
("Process")
("Processing")
("ReadContinued")
("Read")
("ReadReturn")
("Reading'")
("RestPose")
("Sad")
("Search")
("Show")
("Searching")
("StartListening")
("StopListening")
("Surprised")
("Suggest")
("Think")
("Thinking")
("Uncertain")
("Wave")
("Write")
("WriteReturn")
("WriteContinued")
("Writing")





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