Full version: jsB@nk » 3D » Merlin Wizard
URL: https://www.javascriptbank.com/merlin.html
This JavaScript imitates a helping agent from Microsoft name Merlin on your web page.
Full version: jsB@nk » 3D » Merlin Wizard
URL: https://www.javascriptbank.com/merlin.html
<OBJECT id=AgentControl codeBase=#VERSION=2,0,0,0 height=0 width=0 classid=CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F></OBJECT><SCRIPT language=JavaScript type=text/javascript><!--///*'_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/'_/ Portions generated by MASH - The Microsoft Agent Scripting Helper, version 7.0'_/ by BellCraft Technologies, [url]http://www.bellcraft.com/mash[/url]'_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/*/// * Character Objectsvar Merlin;// * Variablesvar UsedChars;var MerlinID;var MerlinACS;var MerlinLoaded;var LoadReq;var HideReq;var MerlinLeftX, MerlinCenterX, MerlinRightX;var MerlinTopY, MerlinCenterY, MerlinBottomY;// * InitializeUsedChars = "Merlin";// * MerlinMerlinID = "Merlin";MerlinACS = "merlin.acs";MerlinLoaded = false;Window_OnLoad();function Window_OnLoad() { // Purpose: Runs automatically when page is loaded // * INSERT ANY NON-AGENT RELATED SCRIPTING HERE AgentControl.Connected = true; MerlinLoaded = LoadLocalChar(MerlinID, MerlinACS); if (!MerlinLoaded) { // Attempt to load default character MerlinLoaded = LoadLocalChar(MerlinID, ""); } if (MerlinLoaded) { SetCharObj(); } CheckLoadStatus();}function LoadLocalChar(CharID, CharACS) { // Purpose: Attempts to load the specified character // Returns: true if successful, false if not AgentControl.RaiseRequestErrors = false; if (CharACS == "") { LoadReq = AgentControl.Characters.Load(CharID); } else { LoadReq = AgentControl.Characters.Load(CharID, CharACS); } AgentControl.RaiseRequestErrors = true; if (LoadReq.Status != 1) { return(true); } return(false);}function SetCharObj() { // Purpose: Sets the character reference and TTS Language ID Merlin = AgentControl.Characters.Character(MerlinID); Merlin.LanguageID = 0x409;}function CheckLoadStatus() { // Purpose: Determines if required characters have been loaded. // If not, issue request to load next character // else run the AgentIntro routine if (!MerlinLoaded) { LoadError(); return(false); } window.status = ""; AgentIntro(); return(true);}function LoadError() { var strMsg; window.status = ""; strMsg = "Error Loading Character: " + MerlinID + "\n"; strMsg = strMsg + "This Microsoft Agent Script requires the character(s):\n"; strMsg = strMsg + UsedChars; alert(strMsg);}function GetScreenPositions() { var ScreenWidth = window.screen.width; var ScreenHeight = window.screen.height; if ((ScreenWidth == 0) || (ScreenHeight == 0)) { ScreenWidth = 800; ScreenHeight = 600; } MerlinCenterX = (parseInt(ScreenWidth / 2) - parseInt(Merlin.Width / 2)); MerlinRightX = (ScreenWidth - Merlin.Width); MerlinCenterY = (parseInt(ScreenHeight / 2) - parseInt(Merlin.Height / 2)); MerlinBottomY = (ScreenHeight - Merlin.Height);}function AgentIntro() { GetScreenPositions(); // *** BEGIN MASH USER SCRIPT *** Merlin.Show(); Merlin.Play("Greet"); Merlin.Play("GetAttention"); Merlin.Play("GetAttentionContinued"); Merlin.Play("GetAttentionContinued"); Merlin.Play("GetAttentionContinued"); Merlin.MoveTo(MerlinCenterX, MerlinCenterY); Merlin.Speak("Welcome to [email protected]" ); Merlin.MoveTo(MerlinRightX, MerlinCenterY); Merlin.Play("Explain"); Merlin.MoveTo(MerlinCenterX, MerlinTopY); Merlin.Play("GestureDown"); Merlin.Speak("[email protected]:: free sourcecode library"); Merlin.Play("Search"); Merlin.Play("Surprised"); Merlin.Speak("Hundred of javascripts"); Merlin.Play("GestureDown"); Merlin.MoveTo(MerlinLeftX, MerlinCenterY); Merlin.MoveTo(MerlinCenterX, MerlinCenterY); Merlin.Speak("Free coolest javascripts"); Merlin.GestureAt(MerlinLeftX, MerlinCenterY); Merlin.Speak("[email protected]:: free sourcecode library"); Merlin.Play("Greet"); Merlin.Hide();Merlin.Show(); Merlin.Play("Greet"); Merlin.Play("GetAttention"); Merlin.Play("GetAttentionContinued"); Merlin.Play("GetAttentionContinued"); Merlin.Play("GetAttentionContinued"); Merlin.MoveTo(MerlinCenterX, MerlinCenterY); Merlin.Speak("Y Quen ! Hai Ngay Khong Noi CHuyen Voi Nhoc Rui Do...Nho Nhoc Nhieu !.. " ); Merlin.Play("Greet"); Merlin.Hide(); // *** END MASH USER SCRIPT ***}//--></SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->