This document was uploaded by user and they confirmed that they have the permission to share
it. If you are author or own the copyright of this book, please report to us by using this DMCA
report form. Report DMCA
Animation compagnon accueil <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript" type="text/javascript"> // * Character Objects var Merlin; // * Variables var UsedChars; var MerlinID; var MerlinACS; var MerlinURL; var MerlinStates; var MerlinAnimations; var MerlinReq; var MerlinStatesReq; var MerlinAnimationsReq; var MerlinLoaded; var LoadReq; var HideReq; var MerlinLeftX, MerlinCenterX, MerlinRightX; var MerlinTopY, MerlinCenterY, MerlinBottomY; // * Initialize UsedChars = "Merlin"; // * Merlin MerlinID = "Merlin"; MerlinURL = "http://www.msagentring.org/chars/merlin/merlin.acf"; MerlinStates = "Showing, Hiding, Speaking, Moving, Gesturing, Idling, Hearing, Listening"; MerlinAnimations = "Suggest, Greet, Read, DoMagic2, Write, WriteContinued, Congratulate, Decline, Explain, GestureLeft, GestureRight, Pleased, Surprised"; MerlinLoaded = false; Window_OnLoad(); function Window_OnLoad() { AgentControl.Connected = true; MerlinLoaded = LoadLocalChar(MerlinID, MerlinACS); if (!MerlinLoaded) { MerlinLoaded = LoadLocalChar(MerlinID, ""); } if (MerlinLoaded) { SetCharObj();
} CheckLoadStatus(); } function LoadLocalChar(CharID, CharACS) { AgentControl.RaiseRequestErrors = false; if (CharACS == "") { if (CharID != "Char") { return(false); } 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() { Merlin = AgentControl.Characters.Character(MerlinID); Merlin.LanguageID = 0x40C; } function CheckLoadStatus() { if (!MerlinLoaded) { window.status = "Loading " + MerlinID + " Character. Please Wait..."; MerlinReq = AgentControl.Characters.Load(MerlinID, MerlinURL); 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 InitAgentCommands() { Merlin.Commands.RemoveAll(); Merlin.Commands.Caption = "MASH Menu"; Merlin.Commands.Add("ACO", "Advanced Character Options", "Advanced Character Options"); } function AgentIntro() { GetScreenPositions(); InitAgentCommands(); // *** BEGIN MASH USER SCRIPT *** Merlin.MoveTo(MerlinRightX, MerlinTopY); Merlin.Show(); Merlin.MoveTo(MerlinCenterX, MerlinBottomY); Merlin.Play("Greet"); Merlin.Speak("Bienvenue sur le site de austenbronte"); Merlin.Play("Read"); Merlin.Speak("J'espère que tu trouveras ce site interessant"); Merlin.MoveTo(MerlinCenterX, MerlinBottomY); Merlin.Play("Read"); Merlin.Speak("Tu trouveras des poèmes, des vidéos, de la musique et des clips."); Merlin.MoveTo(MerlinRightX, MerlinTopY); Merlin.Play("DoMagic2"); Merlin.Play("Write"); Merlin.Speak("Ainsi que des sites et des études consacrés à mes écrivains préférés.."); Merlin.Play("WriteContinued"); Merlin.Speak("Tu peux également laisser ta photo et enregistrer un message vidéo sur mon blog....."); Merlin.Speak("Ainsi que laisser un message sur mon livre d'Or......."); Merlin.GestureAt(MerlinCenterX, MerlinCenterY); Merlin.MoveTo(MerlinLeftX, MerlinCenterY); Merlin.Play("Congratulate"); Merlin.Speak("Tu peux laisser un message pour me dire ce que tu penses..."); Merlin.MoveTo(MerlinCenterX, MerlinCenterY); Merlin.Play("Decline"); Merlin.Play("Decline"); Merlin.Speak("MAIS PAS de remarques désobligeantes ! ! ! "); Merlin.Play("Decline"); Merlin.Play("Decline"); Merlin.Play("Explain"); Merlin.Speak("Les commentaires sont les bienvenus.... ! !"); Merlin.Play("GestureLeft"); Merlin.Play("GestureRight"); Merlin.MoveTo(MerlinRightX, MerlinBottomY); Merlin.Speak("Content de t'avoir ici...."); Merlin.Play("Pleased"); Merlin.MoveTo(MerlinCenterX, MerlinBottomY); Merlin.Play("Surprised"); Merlin.Speak("Bonne visite, bonnes trouvailles et à bientot"); Merlin.MoveTo(MerlinRightX, MerlinCenterY); Merlin.Speak("Bye Tchao See you later...."); Merlin.Play("Greet"); Merlin.MoveTo(-160, -128);