CSDN博客

img sanjiang

HTML文档中用JavaScript调用Microsoft Agent的COM接口编程

发表于2001/8/6 20:18:00  625人阅读

HTML文档中用JavaScript调用Microsoft Agent的COM接口编程

试试下面的代码,看看有什么效果:    

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 2</title>
</head>
<OBJECT id=yuzi classid=CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F width="32" height="32"></OBJECT> 
<SCRIPT> 
var MerlinID; 
var MerlinACS; 
yuzi.Connected = true; 
MerlinLoaded = LoadLocalAgent(MerlinID, MerlinACS); 
Merlin = yuzi.Characters.Character(MerlinID); 
Merlin.Show(); 
Merlin.Play("Surprised"); 
Merlin.Speak("欢迎来到我的家"); 
Merlin.Play("GestureLeft"); 
Merlin.Think("这是一个个人站点"); 
Merlin.Play("Pleased"); 
Merlin.Think("希望能给你带来一些方便与快乐"); 
Merlin.Play("GestureDown"); 
Merlin.Speak("谢谢光临!请以后常来!"); 
Merlin.Hide(); 
function LoadLocalAgent(CharID, CharACS) { 
LoadReq = yuzi.Characters.Load(CharID, CharACS); 
return(true); 

</SCRIPT>
<body>

</body>

</html>

0 0

相关博文

我的热门文章

img
取 消
img