网页中加入以下语句:
<script language="JavaScript" src="ml.js"></script>
<script language="JavaScript">showml();</script>
其中ml.js内容为:
// JavaScript Document
var n=0;
function crml(nid)
{
try {
if(n==0){
n=1;
nid=new ActiveXObject("Agent.Control.2");
nid.Connected = true;
nid.Characters.Load("");
return nid;
}else{
return false;
}
}
catch (err){
return false;
}
}
function showml()
{
if(n==1)return;
var ml=crml ("ml");
if (ml)
{
var MerlinID;
var MerlinACS;
var Merlin;
Merlin = ml.Characters.Character(MerlinID);
Merlin.MoveTo(20,450);
Merlin.Show();
Merlin.Play("GetAttention");
Merlin.Speak("嗨,★☆★☆您好☆★☆★");
Merlin.Play("Gestureup");
Merlin.Speak("嗨,☆★☆★您好★☆★☆");
Merlin.Play("Uncertain");
Merlin.Play("GestureLeft");
Merlin.Speak("欢迎光临...");
Merlin.Play("Gestureup");
Merlin.Speak("~~~我的网站~~~");
Merlin.Play("announce");
Merlin.MoveTo(45,80);
Merlin.Play("GestureLeft");
Merlin.Speak("您可以详细了解...");
Merlin.Play("domagic1");
Merlin.Speak("网站的具体情况.");
Merlin.Play("domagic2");
Merlin.Play("Surprised");
Merlin.MoveTo(380,320);
Merlin.Play("Surprised");
Merlin.Play("GestureRight");
Merlin.Speak("☆★希望您能关注本站...");
Merlin.Play("GestureLeft");
Merlin.think("如果有什么要求和建议...");
Merlin.Play("Read");
Merlin.think("☆★请您不吝指出!!");
Merlin.Play("Blink");
Merlin.Play("GestureUp");
Merlin.think("谢谢支持!");
Merlin.Play("Greet");
Merlin.Hide();
Merlin.MoveTo(580,457);
Merlin.Show();
Merlin.Play("Confused");
Merlin.Play("Acknowledge");
Merlin.Speak("哦,忘了,还有一点...");
/*Merlin.Play("Gestureright");
Merlin.Speak("如果...");
Merlin.Play("Decline");
Merlin.Play("Blink");
Merlin.Speak("或者有好的建议...");
Merlin.Play("Suggest");
Merlin.Play("Blink");
Merlin.Speak("请留言或把美景email给偶^_^");
Merlin.Play("Write");
Merlin.Play("Blink");
Merlin.Play("GestureUp");
Merlin.Speak("★☆★☆谢谢您访问^_^");*/
Merlin.Play("Explain");
Merlin.Play("congratulate");
Merlin.Speak("★☆★☆祝您好运^_^Bye~~~");
Merlin.Play("Wave");
Merlin.Hide();
n=0;
}
}