Forums.Sureshkumar.net : A Perfect Place to Share Knowledge         Blogs     Games    Magazines    

"Sharing knowledge does not lessen your store, often it gets you more. Sharing plays a key role in relationships and bonding, happens in small steps and is assisted through community membership."

Go Back   SURESHKUMAR.NET FORUMS > TECHNICAL DISCUSSIONS > WEB DESIGNING, DEVELOPMENT ,PROMOTION & SEO
Register FAQ Members List Calendar Games Blogs Search Today's Posts Mark Forums Read

   

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 21-03-06, 11:41 AM   #1 (permalink)
Technical GURU
 
BINNY's Avatar
 
Join Date: Feb 2006
Location: India
Posts: 805
Thanks: 4
Thanked 19 Times in 15 Posts
Thanks: 4
Thanked 19 Times in 15 Posts
Blog Entries: 2
Rep Power: 14 BINNY has a spectacular aura about BINNY has a spectacular aura about BINNY has a spectacular aura about BINNY has a spectacular aura about

Integerate Your Site With Talking Characters - MS Agents




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!


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:
<!--Insert this in your BODY TAG--><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 **** 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>


<!-- This Script should be placed in between the Agent Script-->













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();









<!--Chararacter Script Ends-->


ow 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! [img]smileys/smiley2.gif[/img]





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?




So at last thig BIG tutorial has ended!





If u have any probs/comments reply here





Edited by: BINNY
__________________
BINNY
BINNY is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-04-06, 09:06 AM   #2 (permalink)
Super Moderator
 
sk_kireeti's Avatar
 
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117
Thanked 241 Times in 198 Posts
Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51 sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute
Hi Binny,

This is great tip for improving the user friendlyness. Thanks for the coding.

Thanks,
Krishna
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation.
sk_kireeti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-04-06, 02:07 PM   #3 (permalink)
Senior Member
 
Join Date: Mar 2006
Location:
Posts: 125
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 4 rameshkrr has disabled reputation
Hi binny ,

did a good job

keep going




__________________
Ramesh
Preparation + Confidence = Success
rameshkrr is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 27-06-06, 04:17 PM   #4 (permalink)
Moderator
 
Join Date: Apr 2006
Location: India
Posts: 1,733
Thanks: 2
Thanked 143 Times in 132 Posts
Thanks: 2
Thanked 143 Times in 132 Posts
Rep Power: 31 vjsreevs is a splendid one to behold vjsreevs is a splendid one to behold vjsreevs is a splendid one to behold vjsreevs is a splendid one to behold vjsreevs is a splendid one to behold vjsreevs is a splendid one to behold vjsreevs is a splendid one to behold vjsreevs is a splendid one to behold vjsreevs is a splendid one to behold
awesome post binny !!!!
vjsreevs is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 27-06-06, 04:39 PM   #5 (permalink)
Moderator
 
wizkid's Avatar
 
Join Date: Jun 2006
Location: India
Posts: 960
Thanks: 0
Thanked 21 Times in 20 Posts
Thanks: 0
Thanked 21 Times in 20 Posts
Rep Power: 14 wizkid has a spectacular aura about wizkid has a spectacular aura about wizkid has a spectacular aura about
Hi Binny,

This is wonderfull...thank you very much



reg


wizkid

__________________
\"WHEN GOING GETS TOUGH, ONLY THE TOUGH GETS GOING\"
wizkid is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +6.5. The time now is 09:10 AM.





Search Engine Optimization by vBSEO 3.1.0