ÿþ<HTML> <HEAD> <TITLE>Microsoft Agent (JavaScript) French test</TITLE> <META NAME="ROBOTS" CONTENT="NOINDEX"> </HEAD> <BODY language=Javascript onLoad="OnLoad()" BGCOLOR="#FFFFFF" topmargin=0> <!-- Note - rather than simply declare the procedure window_onLoad as in VBScript, the onLoad method is specified in the <BODY> tag to be the JScript function OnLoad(). --> <!--TOOLBAR_START--><!--TOOLBAR_EXEMPT--><!--TOOLBAR_END--> <FONT FACE="verdana,arial,helvetica" SIZE="2"> <CENTER><br><br> <H4><A NAME="TOP" IDX_CONCEPT="stopindex">French</A></H4> <H5><font color="blue"> école, bonjour, bon soir!<br> rhizome, agencement<BR> PLATEAUX de Evidemment<br> Gilles Deleuze &. Félix Guattari<br> </font><br> <font color="#686B97">(JavaScript) Character"Peedy"</font></H5><br> <font name="-ÿ3ÿ00ÿfg" color="#3C6A15"> f[!h0S0“0k0a0o00S0“0p0“0o0<br> ê0¾0ü0à0ÿ9hƒ ÿ0¢0¸0ã0ó0¹0Þ0ó0ÿ¢0ì0ó0¸0á0ó0È0 ÿ<br> ×0é0È0ü00Ç00¨0ô0£0À0â0ó0ÿØšŸSg0f‰0K0k0 ÿ<br> ¸0ë0û0É0¥0ë0ü0º00¢0ó0É00Õ0§0ê0Ã0¯0¹0û0¬0¿0ê0 </font><br><br> <!-- Updated to use Version 2.0 --> <a href="tts.htm"><font color="#8080FF" face="-ÿ3ÿ 0ÿfg" size=3><strong>Back</strong></font></a><br><br> <HR width=66%> <P>This page illustrates the most basic use of Microsoft Agent. <BR>Once the character and its animations have been successfully <BR>loaded, Peedy will appear, say hello, and disappear. <BR>You can refresh the page to make this happen again. <P>Be patient! Loading of the character may take a few minutes. <P>This sample loads its character from an HTTP URL, <BR>so you must be connected to the WWW and be able to <BR>reach the server at <I>http://agent.microsoft.com</I>, <BR>or the sample will not work properly. <P>If you have never installed the Lernout & Hauspie TTS Engine, <BR>you will be prompted to install it. Without the TTS Engine, <BR>characters will speak, but will not produce audible speech output. <P>Right-click on the page and select <B>View Source</B> <BR>to examine the HTML code for this page. <HR width=66%> </CENTER> <!-- In order to use Microsoft Agent, the Microsoft Agent Control OBJECT tag must be placed on the page. The presence of this tag will cause the control to be automatically downloaded and installed if it is not found on the client machine when the page is processed. In the example below, the CODEBASE attribute is used so that the latest version number can be specified. The Agent object will be referred to in script using the name assigned to it in the ID field of the OBJECT tag - in this case, "AgentControl". --> <OBJECT ID="AgentControl" width=0 height=0 CLASSID="CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F" CODEBASE="#VERSION=2,0,0,0"> </OBJECT> <!-- In order to use Text-to-Speech (TTS) output, a TTS engine compatible with Microsoft Agent must be installed on the client's machine. Your Microsoft Agent license includes a license to use the TruVoice TTS engine from Lernout & Hauspie with Microsoft Agent. The OBJECT tag below causes the TTS engine to be downloaded and installed if it is not found on the client machine when the page is processed. The CODEBASE atribute is included in order to specify the latest version number of the control. --> <OBJECT ID="TruVoice" width=0 height=0 CLASSID="CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575" CODEBASE="#VERSION=6,0,0,0"> </OBJECT> <SCRIPT language=Javascript> /* In this example the Microsoft Agent control is managed using JScript. Alternatively, VBScript could be used. */ var Peedy; // a global variable to hold the character object /* Necessary initialization of the control and charcter are most readily accomplished in a page's OnLoad procedure, which is run automatically when the page is first loaded in a browser. The character to be used must first be loaded into the control. In this example the character is loaded from an HTTP URL, which must point to a .ACF file, and an object reference to the newly loaded character is saved in the global variable Peedy. Once a character has been loaded from a .ACF file, it is necessary to GET each animation before PLAYing it. Here we GET all the animations that will be needed at once, rather than waiting until just before they are played. Newly loaded characters are initially hidden, so we show the character as the last step in initializing the character. Since all the requests to the Agent control are queued and executed in request order, the appearance of the character will indicate that the preceding requests succeeded. Note that this sample does not include any code to handle request failures. A production quality page should always include error handling. The JScript function OnLoad, below, was defined to be equivalent to VBScript's window_onLoad procedure in the BODY tag of this page. */ function OnLoad() { AgentControl.Connected = true; // necessary for IE3 AgentControl.Characters.Load("Peedy", "http://agent.microsoft.com//agent2//chars//peedy//peedy.acf"); // Note that JScript strings require 2 slashes for every single slash in a string Peedy = AgentControl.Characters.Character("Peedy"); // Note that use of the Character method, which is optional in VBScript, is required in JScript Peedy.LanguageID = 0x040C; // needed under come conditions Peedy.Get("state", "Showing, Speaking"); Peedy.Get("animation", "Greet, GreetReturn"); Peedy.Show(); Peedy.Get("state", "Hiding"); Peedy.Play("Greet"); Peedy.Speak("école, bonjour, bon soir! "); Peedy.Speak("rhizome, agencement "); Peedy.Speak("PLATEAUX de Evidemment "); Peedy.Speak("Gilles Deleuze &. Félix Guattari"); Peedy.Hide() } </SCRIPT> </BODY> </HTML>