|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
想法是和程序员的想法不一样的.至于为什么.大家去想一想.跟心理学有关的谈天室用Agent+ASP手艺制造语音谈天室
--------------------以下为程序内容,按文章中呈现的按次分块排序
<!--界说"AgentControl"-->
<OBJECTclassid=clsid:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F
codeBase=#VERSION=2,0,0,0id=Agent>
</OBJECT>
<!--界说L&HTruVoiceText-To-SpeechAmericanEnglish-->
<OBJECTclassid=clsid:B8F2846E-CE36-11D0-AC83-00C04FD97575
codeBase=#VERSION=6,0,0,0id=TruVoicewidth="14"height="14">
</OBJECT>
______________________________________________________________
实验从微软Agent脚色目次中装载
SetLoadRequestUNC=Agent.Characters.Load("Peedy","Peedy.acs")
IfLoadRequestUNC.Status0Then
假如失利便实验从微软服务器下载
SetLoadRequestURL=Agent.Characters.Load("Peedy","http://agent.microsoft.com/agent2/chars/peedy/peedy.acf")
Else
如今发生一个Peedy实例
SetPeedy=Agent.Characters("Peedy")
EndIf
_____________________________________________________________
<HTML>
<BODY>
<h3align="center"><fontcolor="#0000FF">WelcometoMyChatroom!</font></h3>
<FORMmethod="POST"action="default.asp">
<palign="center">Yournameplease:
<inputtype="text"name="txtUsername"size="20">
<inputtype="submit"value="OK"name="btnOK"></p>
</FORM>
<palign="center"><ahref="download.htm">Clickheretogotodownloadpage.</a></p>
</BODY>
</HTML>
_______________________________________________________________________
<SCRIPTLANGUAGE=VBScriptRUNAT=Server>
SubApplication_OnStart
Application("message")=""讲话内容
Application("expression")=""心情
Application("sender")=""讲话者ID
Application("globalid")=0讲话总序号
EndSub
</SCRIPT>
_______________________________________________________________________
<%
Session("username")=Server.HtmlEncode(Request.Form("txtUsername"))
Session("personalid")=0
%>
<HTML>
<HEAD>
<TITLE>WelcometoMyChatroom!</TITLE>
</HEAD>
<framesetborder=0frameSpacing=0cols="98,*"frameBorder=0>
<framename="agent"src="agent.asp">
<framesetrows="196,68,*">
<framename="display"src="display.asp">
<framename="refresh"src="refresh.asp">
<framename="message"src="message.asp">
</frameset>
</frameset>
<frameset>
</frameset>
</HTML>
________________________________________________________________
<HTML>
<BODYBGCOLOR="#006699"TEXT="#FFFFFF">
<!--界说"AgentControl"-->
<OBJECTclassid=clsid:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F
codeBase=#VERSION=2,0,0,0id=Agent>
</OBJECT>
<!--界说L&HTruVoiceText-To-SpeechAmericanEnglish-->
<OBJECTclassid=clsid:B8F2846E-CE36-11D0-AC83-00C04FD97575
codeBase=#VERSION=6,0,0,0id=TruVoicewidth="14"height="14">
</OBJECT>
<SCRIPTlanguage=VBScript>
DimPeedy
DimLoadRequestUNC
DimLoadRequestURL
DimGetShowAnimation
SubWindow_OnLoad
LoadCharacter
设置Agent的言语代号
Peedy.LanguageID=&H0409
让Peedy呈现
Peedy.MoveTowindow.event.screenX-100,window.event.screenY-100
Peedy.Show
好啦,Peedy能够启齿措辞了
Peedy.Speak"Welcometomychatroom!"
Peedy.Play"Greet"
EndSub
SubAgent_RequestComplete(ByValRequest)
假如是从微软服务器装载ACF脚色的哀求停止
IfRequest=LoadRequestURLThen
假如请求下载失利
IfRequest.Status=1Then
Msgbox"没法从服务器下载Peedy,大概服务器太忙。"
ExitSub
假如乐成
ElseIfRequest.Status=0Then
发生一个实例
SetPeedy=Agent.Characters("Peedy")
预取Peedy的部分动画效果
SetGetShowAnimation=Peedy.Get("state","showing,speaking")
Peedy.Get"animation","Blink,</p>减少客户内IT专业人才缺乏带来的影响。ASP的客户员工利用浏览器进入相关的应用软件,简单易用,无需专业技术支持。 |
|