复制代码 代码如下:
第一步:写个JS脚本文件flash.js
程序代码:
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)
}
第二步:引用此JS文件到相应页面:
复制代码 代码如下:
<script language="JavaScript" type="text/javascript" src="/UploadFiles/2021-04-02/flash.js">
第三步:具体插入Flash:
程序代码:
复制代码 代码如下:
<script language="JavaScript" type="text/javascript">
writeFlashHTML("_swf=index.swf", "_width=100%", "_height=100%" ,"_wmode=transparent");
</script>
第一步:写个JS脚本文件flash.js
程序代码:
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)
}
第二步:引用此JS文件到相应页面:
复制代码 代码如下:
<script language="JavaScript" type="text/javascript" src="/UploadFiles/2021-04-02/flash.js">
第三步:具体插入Flash:
程序代码:
复制代码 代码如下:
<script language="JavaScript" type="text/javascript">
writeFlashHTML("_swf=index.swf", "_width=100%", "_height=100%" ,"_wmode=transparent");
</script>
标签:
js,Flash
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com
暂无“js Flash插入函数免激活代码”评论...
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。