作家
登录

asp 实现视频显示的效果函数

作者: 来源:www.28hudong.com 2013-03-30 08:37:38 阅读 我要评论

<% '****************************** '函数:SelPlay(strUrl,strWidth,StrHeight) '参数:strUrl,动画视频路径;strWidth,视频高度;StrHeight,视频高度 '作者:阿里西西 '日期:2007/7/13 '描述:取得用户真实IP,对代理地址仍然有效;返回值:文本类型的IP地址 '示例:<%=SelPlay("mov.swf","120","90")%> '****************************** Sub SelPlay(strUrl,strWidth,StrHeight) Dim Exts,isExt If strUrl <> "" Then isExt = LCase(Mid(strUrl,InStrRev(strUrl, ".")+1)) Else isExt = "" End If Exts = "avi,wmv,asf,mov,rm,ra,ram,swf" If Instr(Exts,isExt)=0 Then Response.write "非法视频文件" Else Select Case isExt Case "avi","wmv","asf","mov" Response.write "<EMBED id=MediaPlayer src="&strUrl&" width="&strWidth&" height="&strHeight&" loop=""false"" autostart=""true""></EMBED>" Case "mov","rm","ra","ram" Response.Write "<OBJECT height="&strHeight&" width="&strWidth&" classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>" Response.Write "<PARAM NAME=""_ExtentX"" VALUE=""12700"">" Response.Write "<PARAM NAME=""_ExtentY"" VALUE=""9525"">" Response.Write "<PARAM NAME=""AUTOSTART"" VALUE=""-1"">" Response.Write "<PARAM NAME=""SHUFFLE"" VALUE=""0"">" Response.Write "<PARAM NAME=""PREFETCH"" VALUE=""0"">" Response.Write "<PARAM NAME=""NOLABELS"" VALUE=""0"">" Response.Write "<PARAM NAME=""SRC"" VALUE="""&strUrl&""">" Response.Write "<PARAM NAME=""CONTROLS"" VALUE=""ImageWindow"">" Response.Write "<PARAM NAME=""CONSOLE"" VALUE=""Clip"">" Response.Write "<PARAM NAME=""LOOP"" VALUE=""0"">" Response.Write "<PARAM NAME=""NUMLOOP"" VALUE=""0"">" Response.Write "<PARAM NAME=""CENTER"" VALUE=""0"">" Response.Write "<PARAM NAME=""MAINTAINASPECT"" VALUE=""0"">" Response.Write "<PARAM NAME=""BACKGROUNDCOLOR"" VALUE=""#000000"">" Response.Write "</OBJECT>" Response.Write "<BR>" Response.Write "<OBJECT height=32 width="&strWidth&" classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>" Response.Write "<PARAM NAME=""_ExtentX"" VALUE=""12700"">" Response.Write "<PARAM NAME=""_ExtentY"" VALUE=""847"">" Response.Write "<PARAM NAME=""AUTOSTART"" VALUE=""0"">" Response.Write "<PARAM NAME=""SHUFFLE"" VALUE=""0"">" Response.Write "<PARAM NAME=""PREFETCH"" VALUE=""0"">" Response.Write "<PARAM NAME=""NOLABELS"" VALUE=""0"">" Response.Write "<PARAM NAME=""CONTROLS"" VALUE=""ControlPanel,StatusBar"">" Response.Write "<PARAM NAME=""CONSOLE"" VALUE=""Clip"">" Response.Write "<PARAM NAME=""LOOP"" VALUE=""0"">" Response.Write "<PARAM NAME=""NUMLOOP"" VALUE=""0"">" Response.Write "<PARAM NAME=""CENTER"" VALUE=""0"">" Response.Write "<PARAM NAME=""MAINTAINASPECT"" VALUE=""0"">" Response.Write "<PARAM NAME=""BACKGROUNDCOLOR"" VALUE=""#000000"">" Response.Write "</OBJECT>" Case "swf" Response.Write "<embed src="""&strUrl&""" width="""&strWidth&""" height="""&strHeight&""" type=""application/x-shockwave-flash"" play=""true"" loop=""true"" menu=""true""></embed>" Case else Response.Write "<img src=""/IMages/NoDV.JPG"" />" End Select End If End Sub %>

  推荐阅读

  asp 实现对SQL注入危险字符进行重编码处理的函数

<% '****************************** '函数:CheckStr(byVal ChkStr) '参数:ChkStr,待验证的字符 '作者:阿里西西 '日期:2007/7/15 '描述:对SQL注入危险字符进行重编码处理 '示例:CheckStr("and 1=1 or select>>>详细阅读


本文标题:asp 实现视频显示的效果函数

地址:http://www.17bianji.com/kaifa2/ASP/32483.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)