HTML文档中用JavaScript调用MicrosoftAgent的COM接口编程
时间:2007-02-17 来源:PHP爱好者
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>
php爱好者站 http://www.phpfans.net PHP|MySQL|javascript|ajax|html.
<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>
php爱好者站 http://www.phpfans.net PHP|MySQL|javascript|ajax|html.
相关阅读 更多 +