谁能告诉我怎么在ASP网页中插入FLASH啊
谁能告诉我怎么在ASP网页中插入FLASH啊,我用的是ASP.NET2.0 --------------------编程问答-------------------- 插入Flash就和在纯html页面下一样的啊?不会是不会手写代码吧?贴一段给你
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="904" height="524">
<param name="movie" value="images/index.swf" />
<param name="quality" value="high" />
<embed src="fimages/index.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="904" height="524"></embed>
</object>
//下面是个人签名,呵呵
个人博客http://blog.sithere.net,大部分文章都是收集整理的 --------------------编程问答-------------------- 谢谢了 --------------------编程问答-------------------- 给你个js 吧
用这个,不会有 单击激活此孔件的东西,,
一、将FLASH.js文件放入站点任意文件夹中
二、在网页<head></head>之间插入以下代码
<!--修正FLASH正确显示代码开始-->
<script language="javascript" type="text/javascript" src="flash.js的文件路径"></script>
<!--修正FLASH正确显示代码结束-->
三、用下面java语句完全替换网页中“<object> ……〈/object>"(包括首尾标记)
<script language="javascript" type="text/javascript">
writeflashhtml("_swf=你的FLASH文件地址", "_width=你的FLASH文件宽度", "_height=你的FLASH文件高度" ,"_wmode=transparent");
</script>
OK了,刷新页面看看。绝对可用!
//代码开始
function writeflashhtml( arg )
{
var parm = []
var _default_version = "8,0,24,0";
var _default_quality = "high";
var _default_align = "middle";
var _default_menu = "false";
for(i = 0; i < arguments.length; i ++)
{
parm[i] = arguments[i].split(' ').join('').split('=')
for (var j = parm[i].length-1; j > 1; j --){
parm[i][j-1]+="="+parm[i].pop();
}
switch (parm[i][0])
{
case '_version' : var _version = parm[i][1] ; break ;
case '_swf' : var _swf = parm[i][1] ; break ;
case '_base' : var _base = parm[i][1] ; break ;
case '_quality' : var _quality = parm[i][1] ; break ;
case '_loop' : var _loop = parm[i][1] ; break ;
case '_bgcolor' : var _bgcolor = parm[i][1] ; break ;
case '_wmode' : var _wmode = parm[i][1] ; break ;
case '_play' : var _play = parm[i][1] ; break ;
case '_menu' : var _menu = parm[i][1] ; break ;
case '_scale' : var _scale = parm[i][1] ; break ;
case '_salign' : var _salign = parm[i][1] ; break ;
case '_height' : var _height = parm[i][1] ; break ;
case '_width' : var _width = parm[i][1] ; break ;
case '_hspace' : var _hspace = parm[i][1] ; break ;
case '_vspace' : var _vspace = parm[i][1] ; break ;
case '_align' : var _align = parm[i][1] ; break ;
case '_class' : var _class = parm[i][1] ; break ;
case '_id' : var _id = parm[i][1] ; break ;
case '_name' : var _name = parm[i][1] ; break ;
case '_style' : var _style = parm[i][1] ; break ;
case '_declare' : var _declare = parm[i][1] ; break ;
case '_flashvars' : var _flashvars = parm[i][1] ; break ;
default :;
}
}
var thtml = ""
thtml += "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" + ((_version)?_version:_default_version) + "'"
if(_width) thtml += " width='" + _width + "'"
if(_height) thtml += " height='" + _height + "'"
if(_hspace) thtml += " hspace='" + _hspace + "'"
if(_vspace) thtml += " vspace='" + _vspace + "'"
if(_align) thtml += " align='" + _align + "'"
else thtml += " align='" + _default_align + "'"
if(_class) thtml += " class='" + _class + "'"
if(_id) thtml += " id='" + _id + "'"
if(_name) thtml += " name='" + _name + "'"
if(_style) thtml += " style='" + _style + "'"
if(_declare) thtml += " " + _declare
thtml += ">"
if(_swf) thtml += "<param name='movie' value='" + _swf + "'>"
if(_quality) thtml += "<param name='quality' value='" + _quality + "'>"
else thtml += "<param name='quality' value ='" + _default_quality + "'>"
if(_loop) thtml += "<param name='loop' value='" + _loop + "'>"
if(_bgcolor) thtml += "<param name='bgcolor' value='" + _bgcolor + "'>"
if(_play) thtml += "<param name='play' value='" + _play + "'>"
if(_menu) thtml += "<param name='menu' value='" + _menu + "'>"
else thtml += "<param name='menu' value='" + _default_menu + "'>"
if(_scale) thtml += "<param name='scale' value='" + _scale + "'>"
if(_salign) thtml += "<param name='salign' value='" + _salign + "'>"
if(_wmode) thtml += "<param name='wmode' value='" + _wmode + "'>"
if(_base) thtml += "<param name='base' value='" + _base + "'>"
if(_flashvars) thtml += "<param name='flashvars' value='" + _flashvars + "'>"
thtml += "<embed pluginspage='http://www.macromedia.com/go/getflashplayer'"
if(_width) thtml += " width='" + _width + "'"
if(_height) thtml += " height='" + _height + "'"
if(_hspace) thtml += " hspace='" + _hspace + "'"
if(_vspace) thtml += " vspace='" + _vspace + "'"
if(_align) thtml += " align='" + _align + "'"
else thtml += " align='" + _default_align + "'"
if(_class) thtml += " class='" + _class + "'"
if(_id) thtml += " id='" + _id + "'"
if(_name) thtml += " name='" + _name + "'"
if(_style) thtml += " style='" + _style + "'"
thtml += " type='application/x-shockwave-flash'"
if(_declare) thtml += " " + _declare
if(_swf) thtml += " src='" + _swf + "'"
if(_quality) thtml += " quality='" + _quality + "'"
else thtml += " quality='" + _default_quality + "'"
if(_loop) thtml += " loop='" + _loop + "'"
if(_bgcolor) thtml += " bgcolor='" + _bgcolor + "'"
if(_play) thtml += " play='" + _play + "'"
if(_menu) thtml += " menu='" + _menu + "'"
else thtml += " menu='" + _default_menu + "'"
if(_scale) thtml += " scale='" + _scale + "'"
if(_salign) thtml += " salign='" + _salign + "'"
if(_wmode) thtml += " wmode='" + _wmode + "'"
if(_base) thtml += " base='" + _base + "'"
if(_flashvars) thtml += " flashvars='" + _flashvars + "'"
thtml += "></embed>"
thtml += "</object>"
document.write(thtml)
}
//代码结束
//by http://www.ShaTouJiao.com --------------------编程问答-------------------- 把js保存为<script language="javascript" type="text/javascript" src="Inc/flashflash.js"></script>
引用,就行了
补充:.NET技术 , ASP.NET