Showing those crazy MS agent characters
First the user must have a MS agent installed for this example we will use Merlin
Download him here...
http://download.microsoft.com/download/1/d/b/1dbe...f3c4669/Merlin.exe
for more agents see here
http://www.msagentring.org/chars.htm
Code to load your character
code:
//open a new object of the agent control
var Agents = new ActiveXObject("agent.control.2");
Agents.Connected = true;
//now to load our character into that control.
Agents.Characters.Load("Merlin","C:\\WINDOWS\\msagent\\chars\\Merlin.acs");
var merlin = Agents.Characters.Character("Merlin");
To show him you do
code:
merlin.Show();
To hide him you do
code:
merlin.Hide();
To make him speak you do (must be showing to speak this)
code:
merlin.Speak('dt is your master now');
To make him think
code:
merlin.Think("Oh wow im thinking ");
each character also has gestures which they can do like...
to make merlin lift his arms and then point to the right..
code:
merlin.Play("GestureUp");
merlin.Play("GestureRight");
To move a character you do
code:
merlin.MoveTo(300,200);
which makes merlin to a crazy flying animation to that point
This code shows merlin makes him fly to a point then say hello , raise his hands and then hide.
code:
//open a new object of the agent control
var Agents = new ActiveXObject("agent.control.2");
Agents.Connected = true;
//now to load our character into that control.
Agents.Characters.Load("Merlin","C:\\WINDOWS\\msagent\\chars\\Merlin.acs");
var merlin = Agents.Characters.Character("Merlin");
merlin.Show();
merlin.MoveTo(300,200);
merlin.Speak('Hello');
merlin.Play("GestureUp");
merlin.Hide();
To make your agent speak what hes saying outloud you need to install the MS speech stuff
http://activex.microsoft.com/activex/controls/agent2/tv_enua.exe
http://activex.microsoft.com/activex/controls/sapi/spchapi.exe