Forum     

Go Back   Digit Technology Discussion Forum > Community > Tutorials
Register FAQ Calendar Mark Forums Read

Tutorials This section offers tutorials and How to's on just about anything related to computers and IT. Note: All tutorials are courtesy the posters and not verified by Digit


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 09-03-2006, 11:26 PM   #1 (permalink)
Apprentice
 
Join Date: Mar 2004
Location: www.technik.co.in
Posts: 64
Default * Integerate Your Site With Talking Characters - MS Agents *


Hello All



Have You ever seen the above MS Agents in any of the websites ? They Demonstrate things,Explain,Greet your visitor,
Give Information about the user and above all they give a pretty cool cool to your website! Want them on your site?

This tutorial will explain on how to Integerate MS Agents in your website!

For those who cannot understand what I am talking about or want to see a sample check them on my sample page! ->->->
http://www.technik.co.in/docs/agent_sample.htm

This tutorial may feel every long but beleieve me I have made it easy as much as possible Advanced users may just take a time upto 10 Mins.

Some of you might not be able to see this Agent in the above link there are plenty of reasons ->

1) You donot have required componenets to view them. ( Check More for the solution)
2) You donot have ActiveX controls enabled in your browser
3) Your firewall might be blocking the (agentsvr32.exe) file , if your firewall propmts for a permisiion to agentsvr32.exe allow it!
4) There could be many more reasons but users with Windows will have a cool stay!

What it is?
Actually this thing is nothing but calling off the Microsoft Agent(s) with most of them in Mircrosoft Office to your webpage with certain actions and speeches.This really gives a great look to your website.

What you require?
Actually there are 4 components required to see these/this agent(s),your visitor may too need this component(s) to view your cool website.Donot worry all the components donot exceed 2MB size! and THE MOST important is it only works in Interent Explorer as far as i know, I donnot know abt Firefox.

Now how to know whether you or the user has or hasn`t the required components?

Visit this page, this page will automatically detect the required components and make a checklist and will give you the download link too if you have missed some!

If you already have all the required components youm will be perfectlly able to see the sample page.

Check Components Here ->> *** Components Check & Download Here ***

Ohh! Now done with the every components! Lets start the work.

What you need to do?
Just costumize the full HTML code inbetween your BODY tags.

The main Script!This is the main script : ( THIS IS THE SCRIPT PROGRAMMED FOR THE AGENT : MERLIN ) Soon I will post of remaining 3 agents.


Code:
<OBJECT ID="Rainbow" width="0" height="0"
CLASSID="CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F"
CODEBASE="#VERSION=2,0,0,0">
</OBJECT> 
<OBJECT ID="TruVoice" width="0" height="0"
CLASSID="CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575"
CODEBASE="#VERSION=6,0,0,0">
</OBJECT>

<script language="JavaScript" type="text/javascript">
// Script By Technik.Co.In CopyRight 2006 You can copy this script but you MUST leave the source " Technik.co.in ". 
<!--//
var Char;
var UsedChars;
var CharID;
var CharACS;
var CharLoaded;
var LoadReq;
var HideReq;

UsedChars = "Char";

CharID = "Char";
CharACS = "";
CharLoaded = false;

Window_OnLoad();

function Window_OnLoad() {
Rainbow.Connected = true;

CharLoaded = LoadLocalChar(CharID, CharACS);

if (!CharLoaded) {
CharLoaded = LoadLocalChar(CharID, "");
}

if (CharLoaded) {
SetCharObj();
}
CheckLoadStatus();
}

function LoadLocalChar(CharID, CharACS) {
Rainbow.RaiseRequestErrors = false;
if (CharACS == "") {

LoadReq = Rainbow.Characters.Load(CharID);
}
else {
LoadReq = Rainbow.Characters.Load(CharID, CharACS);
}
Rainbow.RaiseRequestErrors = true;

if (LoadReq.Status != 1) {
return(true);
}
return(false);
}

function SetCharObj() {
Char = Rainbow.Characters.Character(CharID);
Char.LanguageID = 0x409;
}

function CheckLoadStatus() {
if (!CharLoaded) {
LoadError();
return(false);
}

window.status = "";
AgentIntro();
return(true);
}
// *** ERROR MESSAGE DISPLAYED WHEN REQUIRED COMPONENTS ARE MISSING - Technik.Co.In ***
function LoadError() {
var strMsg;
window.status = "";
strMsg = "Error Loading Character: " + CharID + "\n";
strMsg = strMsg + "This Microsoft Agent Script requires the character(s):\n";
strMsg = strMsg + UsedChars;
alert(strMsg);
}
// *** !!! ERROR MESSAGE END !!! - Technik.Co.In ***
function InitAgentCommands() {
Char.Commands.RemoveAll();
}

function AgentIntro() {
InitAgentCommands();

// *** CAREFUL : AGENT SCRIPT BEGINS HERE - Technik.Co.In ***

 

// *** CAREFUL : AGENT SCRIPT ENDS HERE - Technik.Co.In ***
}
//-->
</script>

<script language="JavaScript" type="text/javascript" for="Rainbow" event="Click(CharacterID, Button, Shift, X, Y)">
<!-- 
// This event is a exaple on how to agent will react on single click! - Technik.Co.In

Char.StopAll();
Char.Play ("Alert");
Char.Speak ("Hey, watch it with that shitty mouse!|Oh that tickles!|ROFL!");
Char.Play ("Blink");
Char.Play ("RestPose");
// -->
</script>

<script language="JavaScript" type="text/javascript" for="Rainbow" event="DblClick(CharacterID, Button, Shift, X, Y)">
<!--
// This event is a exaple on how to agent will react on double click! - Technik.Co.In

Char.StopAll();
Char.Play ("Alert");
Char.Speak ("Hey, watch it with that pointer! OK i'll go.|Oh you double clicked me it tickles more. Goodbye!|OK Bye!");
Char.Hide();
//-->
</script>
Find """ AGENT SCRIPT BEGINS HERE """" and insert CHAR script there!These things may feel though isn`t it? But read the whole tut i have just expanded it

Now The Character Script !
You may have already visited our Sample Page
I will take the Sample page as the example for the purpose of the character script!

This is the agent script as there in the Sample Page.



Code:
Char.MoveTo(0, 0);
Char.Show();
Char.MoveTo(900, 500);
Char.Play("Greet");
Char.Speak("Hello and welcome to Technik.CO.IN");
Char.Play("Pleased");
Char.Speak("My name is Merlin! Its Nice to Meet u!");
Char.Play("Think");
Char.Speak("Now I am here for testing purposes, but soon I will appear at many places!");
Char.Play("Process");
Char.Speak("My reports show that u have comehere to test me");
Char.Play("Search");
Char.Play("GetAttentionContinued");
Char.MoveTo(584, 321);
Char.Play("Suggest");
Char.Speak("\\Chr=\"Whisper\"\\Take Me With You!.");
Char.Play("Sad");
Char.Speak("I know u would not dissappoint me");
Char.Play("Think");
Char.Play("Pleased");
Char.Speak("do u desire to take me with you?");
Char.MoveTo(10, 200);
Char.Speak("Click at the link named Take this agent, to take me with you.");
Char.Play("Pleased");
Char.Speak("\\Chr=\"Whisper\"\\I think the webmaster is coming, time to go bye!.");
Char.Hide();


Now many of u might ask whats that?

The Commands which are present ONLY in the sample script. ( There are lot fo more commands refer below) ::::

**** List Of all Commands and actions can be found below ****

Char.Show(); ---> Displays or enables the Agent for which the cript is configured.

Char.MoveTo(x, y); ---> Move the character to desired place ( X= Width ,, Y=Height)

Char.Play("ACTION"); ---> Plays the desired Action ( Action needs to be replaced with the desired action see below for the action(s) list )

Char.Speak("U R Message"); ---> The Message that you want your character to talk! ( Replace Your Message)

Char.Speak("\\Chr=\"Whisper\"\\U r Message Here"); ---> " Whisper Command " the character talks in a whispering way.

Char.Think("U r Message"); ---> Only the white message box appears with your message in it. It displays as the agent is thinking.

************************************************** ***********
>>>>>Breaking up the commands<<<<<

The Commands ->>>>

1) * Char.Speak ("Welcome To Technik.Co.In); *

This Command indicated your character to speak the test inside the brackets and quotes.
This works through the TTS Engine which is one of the four componenets.

2) * Char.Show/Hide(); *

This Command respectively shows or hides the agent.

3) * Char.MoveTo(XW, YL) *

This Command will move your character to the desired height and width.
As for Merlin he takes a flight to the desired place.

4 * Char.Play("Desired Action") *

This is the most important action of all the agents.This Command plays the animation u desire.
All you have to do is Pick the animation from the list given below and replace it in place of Desired Action.
Without this it wud be Bad!

Now almost we have reached at last.
And Below we are going to see list of animations !!!

Animations for the agents..........

Code:
("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")
^^^ So these are the actions ^^^

Now something for advanced users!
Figure out the scripts at last giving the Single/Double Click actions?


Again the handy links ->

Sample Page
Components check & downloads
Source

So at last thig BIG tutorial has ended!

If u have any probs/comments reply here

Was the tut good? :roll:
krishnansurya is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 10-03-2006, 01:49 AM   #2 (permalink)
Rubik's Uncle!!
 
Charan's Avatar
 
Join Date: Sep 2004
Location: ಬೆಂಗಳೂರು (Bengaluru)
Posts: 3,791
Default

Wow!!! I had done these things 6 years ago. I had done some standalone applications which included these MS agents. ne way thanks for reminding it. I will impliment it in my next project
__________________
i5 2400 | DH67BL | G.Skill Ripjaw 4 GB | FSP SAGA II 500W | CM 430 Black Elite | MSI R6850 Cyclone PE/OC | XBox 360 Controller | 21.5" Samsung Sync Master 2233 | 4 Mbps @75GB FUP :)
Battlefield 3 Multiplayer Discussion | Battlefield 3 Low Latency Servers List
Charan is offline  
Old 20-03-2006, 03:12 PM   #3 (permalink)
Alpha Geek
 
Join Date: Mar 2005
Posts: 517
Default

great man , will integrate it in my site soon
__________________
\" I Do not like to repeat success , i like to move on to other things \"
mako_123 is offline  
Old 23-03-2006, 04:08 PM   #4 (permalink)
In The Zone
 
deepak.krishnan's Avatar
 
Join Date: Jan 2005
Location: Palakkad/Bangalore
Posts: 423
Default

Well I tried wut u said.But it is not appearing in my site.I pasted the code you gave into the index page of my site in the body.But its not working.Is there anything to be changed in your code so that it will work in my site?
Also when I tried to open the merlin file that I downloaded,a dialog box appears and then closes by itself. What all are there in the downloaded thing?Is it necessary to uploade the downloaded file to my site so that it will work?
__________________
.dk
deepak.krishnan is offline  
Old 23-03-2006, 04:27 PM   #5 (permalink)
Apprentice
 
Join Date: Mar 2004
Location: www.technik.co.in
Posts: 64
Default

hmm.. I think You donot have the required components
GO here -> Components Check

^^ This Page will automatically check whehter u have the required componenets or not.
If you Have any of the components absent , the download link(s) to the respective components are available on the same page.

If u still face problems PM me.
krishnansurya is offline  
Old 15-04-2006, 10:45 PM   #6 (permalink)
Pharmaguru
 
kjuvale's Avatar
 
Join Date: May 2004
Location: Pune
Posts: 343
Default

Oh thats was great i have already tried it at my website homepage www.pharmatalk.coz.in
__________________
My Photography gadgets :
Nikon D5100 with 18-55mm VR Lens, Nikkor AF-S 50mm 1.8g, Tamron VS 70-300 VC Di
Cullmann NANOMAX 220 Tripod. | Crumpler messenger boy stripes 4000 camera bag :grin:
kjuvale is offline  
Old 26-04-2006, 09:24 AM   #7 (permalink)
In The Zone
 
ferrarif50's Avatar
 
Join Date: May 2004
Posts: 221
Default

Hmm...

I would not advise to have any Active X objects to be used in the websites, as it is a very critical security issue and the best practices suggests that, it should be avoided.

Even, the upcoming IE7, has Active X disabled by default. Using them, will narrow down your audiences very much.

In these days of Web 2.0, AJAX, Rich Flash and other buzzwords whose mantra is to provide rich interactive content that can be delivered in the web sites, without much hassle and by using common techniques, compromising on compatibility for look and feel will be a costly mistake.

A good tutorial for playing around though!
__________________
My time machine will take you one hour into the future in only sixty minutes!
ferrarif50 is offline  
Old 07-05-2006, 11:24 AM   #8 (permalink)
Administratus Rotundus
 
FatBeing's Avatar
 
Join Date: Jan 2006
Location: Pittsburgh, PA
Posts: 385
Default Re: * Integerate Your Site With Talking Characters - MS Agents *

krishnansurya, this doesn't seem to be an original. Please post a source (or prove originality)ASAP. You have 24 hours.
__________________
YOU SHALL PAY FOR YOUR SINS!
(In case you have already paid, please ignore this notice)
FatBeing is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by chris
- by icebags
- by Tenida

Advertisement




All times are GMT +5.5. The time now is 01:20 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2