JS创建FLASH,访讯雷截屏
function createFlashMove(obj,sName,src,width,height,wmode,fullscreen){
var swf=document.createElement("object");
var param=document.createElement("param");
param.setAttribute("name","movie");
param.setAttribute("value",src);
param.setAttribute("allowFullScreen","true");
swf.appendChild(param);
if(fullscreen){
var param=document.createElement("param");
param.setAttribute("name","allowScriptAccess");
param.setAttribute("value","always");
swf.appendChild(param);
}
if(wmode){
param=document.createElement("param");
param.setAttribute("name","wmode");
param.setAttribute("value","transparent");
swf.appendChild(param);
}
var embed=document.createElement("embed");
embed.setAttribute("type","application/x-shockwave-flash");
embed.src=src;
if(fullscreen) embed.setAttribute("allowScriptAccess","always");
if(wmode) embed.setAttribute("wmode","transparent");
embed.setAttribute("width",width);
embed.setAttribute("height",height);
embed.name=sName;
obj.appendChild(swf);
swf.setAttribute("type","application/x-shockwave-flash");
swf.setAttribute("data",src);
swf.setAttribute("width",width);
swf.setAttribute("height",height);
if(sName) swf.id=sName;
}
//调用
createFlashMove(document.getElementById("index-adl"),"index_leftadswf","flash/index_leftad.swf",248,697,"1","1");