首页 > 开发 > JS > 正文

另类调用flash无须激活的方法

2024-09-06 12:44:06
字体:
来源:转载
供稿:网友
代码如下:<script type="text/javascript">
/** 
 * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ 
 * 
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License: 
 * http://www.opensource.org/licenses/mit-license.php 
 * 
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for 
 *   legal reasons. 
 */ 
if(typeof deconcept=="undefined"){var deconcept=new Object();} 
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();} 
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();} 
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){ 
if(!document.createElement||!document.getElementById){return;} 
this.DETECT_KEY=_b?_b:"detectflash"; 
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY); 
this.params=new Object(); 
this.variables=new Object(); 
this.attributes=new Array(); 
if(_1){this.setAttribute("swf",_1);} 
if(id){this.setAttribute("id",id);} 
if(w){this.setAttribute("width",w);} 
if(h){this.setAttribute("height",h);} 
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));} 
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7); 
if(c){this.addParam("bgcolor",c);} 
var q=_8?_8:"high"; 
this.addParam("quality",q); 
this.setAttribute("useExpressInstall",_7); 
this.setAttribute("doExpressInstall",false); 
var _d=(_9)?_9:window.location; 
this.setAttribute("xiRedirectUrl",_d); 
this.setAttribute("redirectUrl",""); 
if(_a){this.setAttribute("redirectUrl",_a);}}; 
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){ 
this.attributes[_e]=_f; 
},getAttribute:function(_10){ 
return this.attributes[_10]; 
},addParam:function(_11,_12){ 
this.params[_11]=_12; 
},getParams:function(){ 
return this.params; 
},addVariable:function(_13,_14){ 
this.variables[_13]=_14; 
},getVariable:function(_15){ 
return this.variables[_15]; 
},getVariables:function(){ 
return this.variables; 
},getVariablePairs:function(){ 
var _16=new Array(); 
var key; 
var _18=this.getVariables(); 
for(key in _18){ 
_16.push(key+"="+_18[key]);} 
return _16; 
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表