Note this tip only works in IE, and the user will be asked to authorize the agent


Received: from elementktips.com (elementktips.com [204.255.225.34] (may be forged))
Received: from tips (helo=localhost)
	by elementktips.com with local-smtp (Exim 2.05 #1)
	id 12pFo8-0007NL-00; Tue, 9 May 2000 15:36:40 -0400
Received: by mail.elementktips.com (ZDTips_Mailer v1.5); Tue, 9 May 2000 15:35:56 -0400
Subject: ASPTips:  Adding a Microsoft Agent to Your Web Site
From: [email protected]
To: [email protected]
Message-ID: <[email protected]>
Date: Tue, 9 May 2000 15:36:40 -0400
X-UIDL: 398d20504c7bee671399d2f9a4800017

Adding a Microsoft Agent to Your Web Site

Putting an agent on your Web site can do a lot to liven up your content
and keep your visitors coming back for more. You can also use an agent 
to explain complicated Web-based forms or other interfaces. Embedding an
agent in your page is as simple as adding the following <object> tag 
within the <body> section:

<object id="theAgent" width="0" height="0"
    classid="CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F"
    codebase="#VERSION=2,0,0,0">
</object>
		

		
Then, to load the Merlin character and make him do something when the 
user's browser first loads the Web page, just add a little bit of 
client-side script. We're using VBScript here, but you can just as easily
use JScript if you prefer. Here's an example:
		
<script language="vbscript">
dim theWebAgent
sub window_onLoad
    theAgent.characters.load "theChar", "merlin.acs"
    set theWebAgent = theAgent.characters("theChar")
    with theWebAgent
        .show
        .moveTo 100,200
        .play "wave"
        .speak "Hello! Welcome to my web site! "
    end with
end Sub
</script>
				
	
							
This code loads the desired character and directs it to move around and 
speak. There are over 50 distinct animations that this agent can perform
in addition to speaking, so it's not likely that your visitors will get
bored any time soon!

What do you think?

Name (optional)

Email (optional)

Your comment (optional, but helpful)