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

<%

'******************************

'函数: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

%>

时间: 2024-09-20 21:23:35

asp 实现视频显示的效果函数的相关文章

asp 实现视频显示的效果函数_应用技巧

<% '****************************** '函数:SelPlay(strUrl,strWidth,StrHeight) '参数:strUrl,动画视频路径:strWidth,视频高度:StrHeight,视频高度 '作者:阿里西西 '日期:2007/7/13 '描述:取得用户真实IP,对代理地址仍然有效:返回值:文本类型的IP地址 '示例:<%=SelPlay("mov.swf","120","90")%&

asp之日期和时间函数示例

函数|示例 asp之日期和时间函数示例 可以使用日期和时间函数来得到各种格式的日期和时间 函数 语法 说明 示例 Now Now() 取得系统当前的日期和时间 Dim MyVar MyVar = Now' MyVar 包含当前的日期和时间. Date Date() 取得系统当前的日期 Dim MyDate MyDate = Date' MyDate 包含当前系统日期. Time Time() 取得系统当前的时间 Dim MyTime MyTime = Time ' 返回当前系统时间. Year

Asp 利用 Jmail 发信的函数

jmail|函数 Asp 利用 Jmail 发信的函数 '作者:Loster(OICQ:181306) [如果转载请勿删除此信息,谢谢!]'函数名:Send_Email()'作用:利用Jmail4.3组件发送E-Mail'参数:'Email:类型:字符串.作用:接收E-Mail的地址.'E_Subject:类型:字符串.作用:信件主题.'Information:类型:字符串.作用:信件内容.'S_Type:类型:布尔值.作用:是否为Html格式信件.True为Html格式.False为文本格式.

ASP超级链接和HTML函数正则表达式 修正版_正则表达式

过滤超级链接 复制代码 代码如下: Function RegRemoveHref(HTMLstr) Set ra = New RegExp ra.IgnoreCase = True ra.Global = True ra.Pattern = "<A[^>]+>(.+?)<\/A>" RegRemoveHref = ra.replace(HTMLstr,"$1") END Function 过滤所有HTML代码 复制代码 代码如下: Fu

jQuery中常用动画效果函数(日常整理)_jquery

jquery中动画效果非常多,下面小编给大家分享一下jquery中的动画函数. jQuery的效果函数列表: animate():对被选元素应用"自定义"的动画. clearQueue():对被选元素移除所有排队的函数(仍未运行的). delay():对被选元素的所有排队函数(仍未运行)设置延迟. dequeue():运行被选元素的下一个排队函数. fadeln():逐渐改变被选元素的不透明度,从隐藏到可见. fadeOut():逐渐改变被元素的不透明度,从可见到隐藏. fadeTo(

浅谈jQuery效果函数_jquery

jQuery有很多的效果可以实现,比如说淡入淡出的效果:<html> <head> <style> #box{width:200px;height:200px;background:red;opacity:1;} </style> </head> <body> <div id="box"> </div> <input type="button" value=&quo

Asp:base64编码、解码函数

Asp:base64编码.解码函数www.xufei.net [2003-3-6] --------------------------------------------------------------------------------base64编码.解码函数 这是我看完几个base64编码.解码函数后自己改写的.因为,在中文操作系统的VBscript中,使用的是unicode字符集,所以很多base64编码.解码函数在理论上是正确的,但实际不能运行!文件名称base64test.as

ASP超级链接和HTML函数正则表达式 修正版

过滤超级链接 复制代码 代码如下: Function RegRemoveHref(HTMLstr) Set ra = New RegExp ra.IgnoreCase = True ra.Global = True ra.Pattern = "<A[^>]+>(.+?)<\/A>" RegRemoveHref = ra.replace(HTMLstr,"$1") END Function 过滤所有HTML代码 复制代码 代码如下: Fu

ASP应用中的应用函数

函数|函数 1,经常写些系统,那么一般都是从登录程序开始,每接一个系统就写一次登录,好麻烦. 干脆直接做个登录验证函数吧,对我来说,大都情况可以胜任了:) <%Function chk_regist(requestname,requestpwd,tablename,namefield,pwdfield,reurl)dim cn_name,cn_pwdcn_name=trim(request.form(""&requestname&""))cn_