<object classid="clsid:2398E32F-5C6E-11D1-8C65-0060081841DE" id="TextToSpeech1" data="DATA:application/x-oleobject;BASE64,L+OYI25c0RGMZQBgCBhB3gICAADYEwAA2BMAAA==" width="6" height="6"></object><script language="javascript"><!--function start(){TextToSpeech1.Speak(document.all["main"].innerText);}//*开始朗读function pause(){TextToSpeech1.Pause();}//*暂停朗读function resume(){TextToSpeech1.Resume();}//*继续朗读function end(){TextToSpeech1.StopSpeaking();}//*停止朗读//--></script><a href="javascript:void start()">朗读</a> <a href="javascript:void pause()">暂停</a> <a href="javascript:void resume()">继续</a> <a href="javascript:void end()">停止</a>
<object classid="clsid:B8F2846E-CE36-11D0-AC83-00C04FD97575" id="TTS" data="DATA:application/x-oleobject;BASE64,boTyuDbO0BGsgwDAT9l1dQADAADYEwAA2BMAAA=="></object><object classid="clsid:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F" id="Agent1"></object><script language="VBScript">'载入动画精灵Agent1.connected=trueAgent1.characters.load "merlin","merlin.acs"set Chuboies=Agent1.characters.character("merlin")Chuboies.commands.removeall()Chuboies.commands.visible=trueChuboies.commands.caption="楚布衣工作室"Chuboies.commands.add "menu0","关于本站","关于本站"Chuboies.commands.add "menu1","站长简介","站长简介"Chuboies.commands.add "menu2","本站地图","本站地图"Chuboies.commands.add "menu3","联系本站","联系本站"Chuboies.commands.add "menu4","本站链接","本站链接"Chuboies.show()Chuboies.moveto screen.width/2,screen.height/2Chuboies.play "GetAttention"Chuboies.speak "\pit=156\\spd=156\欢迎光临“楚布衣工作室”!"Chuboies.play "GetAttentionReturn"Chuboies.play "Announce"Chuboies.speak "\pit=156\\spd=156\我是“布衣精灵”,有什么需要帮助的,请点我!"Chuboies.play "AnnounceReturn"Chuboies.play "Greet"Chuboies.play "GreetReturn"Chuboies.moveto screen.width-200,screen.height-500Sub Agent1_Command(UserInput)'右键菜单select case UserInput.Name case "menu0" msgbox "关于本站",32,"辅助菜单" case "menu1" msgbox "站长简介",32,"辅助菜单" case "menu2" msgbox "本站地图",32,"辅助菜单" case "menu3" msgbox "联系本站",32,"辅助菜单" case "menu4" msgbox "本站链接",32,"辅助菜单"end selectEnd SubSub Agent1_Click(CharacterID,Button,Shift,X,Y)'精灵对话框if Button=1 then Chuboies.Stop Chuboies.play "Confused" Chuboies.speak "\pit=156\\spd=156\有什么需要我帮忙的吗?" Chuboies.play "RestPose"end ifEnd SubSub Agent1_DblClick(CharacterID,Button,Shift,X,Y)'更改精灵的位置if Button=1 then Chuboies.Stop Chuboies.think "\pit=156\\spd=156\我站的位置不对吗?" Chuboies.think "\pit=156\\spd=156\那我换一个位置吧,呵呵……" Chuboies.moveto rnd*(screen.width-Chuboies.width),rnd*(screen.height-Chuboies.height)end ifEnd SubSub Agent1_DragStart(CharacterID,Button,Shift,X,Y)'开始拖动精灵cur_x=X-Chuboies.width/2cur_y=Y-Chuboies.height/2End SubSub Agent1_DragComplete(CharacterID,Button,Shift,X,Y)'停止拖动精灵Chuboies.stopChuboies.play "Confused"Chuboies.speak "\pit=156\\spd=156\请不要再拖动我,可以吗?"Chuboies.play "RestPose"Chuboies.moveto cur_x,cur_yEnd SubSub Window_Unload()'删除动画精灵set Chuboies=nothingAgent1.connected=falseEnd Sub</script>
源代码:(请确认您的电脑装载了微软的“Direct Text-to-Speech”控件)<object classid="clsid:EEE78591-FE22-11D0-8BEF-0060081841DE" id="DirectSS1" data="DATA:application/x-oleobject;BASE64,kYXn7iL+0BGL7wBgCBhB3gICAADYEwAA2BMAAAIAAAACAAAAAgC0AAIAggACAAAAAgAyAAIA5gACAPAAAgAAAAIAAQACAAEAAgABAAIAAAA=" width="1" height="1"></object>//*引用微软的“Direct Text-to-Speech”控件,此为能朗读的关键<script language="javascript"><!--function readall(){DirectSS1.speak(document.all["main"].innerText);}//*朗读main中的文字function readtext(srcElement){DirectSS1.speak(srcElement.innerText);}//*鼠标移到srcElement上,触发朗读function outtext(){DirectSS1.speak("");}//*鼠标移开停止朗读//--></script>