Microsoft for various reasons, in the SP2 after restricting the use of IE ActiveX mode, is in the page ActiveX has a virtual box, users need to click a time to normal interaction. Flash is embedded in the Web page as an ActiveX, so it will also be implicated, only through JS embedded in Flash to solve this problem. No flash version detection, if the version of the Flash plugin version browser is not enough, or the normal display of your SWF file, or will pop up an ActiveX confirmation of the installation of the box-this box for many users is very scary, online search for a long time, not a slide ad code, No way, the study of their own, passed through the test.
First in the <script. Src= "Ad/global.js" type= "Text/javascript" ></script>
The Global.js code is as follows:
Copy Code code as follows:
function My_getbyid (ID)
{
ITM = null;
if (document.getElementById)
{
ITM = document.getElementById (ID);
}
else if (document.all)
{
ITM = Document.all[id];
}
else if (document.layers)
{
ITM = Document.layers[id];
}
return ITM;
}
function Sunad (element,url,width,height,images,links,texts)
{
if (!my_getbyid (Element)) return;
var str = ';
str = ' <object classid= ' clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 ' codebase= ' http://fpdownload.macromedia.com /pub/shockwave/cabs/flash/swflash.cab#version=7,0,9,0 "width=" ' + width + ' "height=" ' + height + ' > ';
str = ' <param name= "allowscriptaccess" value= "Samedomain" ><param name= "movie" value= "' +url+ '" ><param Name= "Quality" value= "High" ><param name= "bgcolor" value= "#ffffff" >;
STR + + ' <param name= ' menu ' value= ' false ' ><param name=wmode value= ' opaque ' > ';
str = ' <param name= "flashvars" value= "pics= ' +images+ ' &links= ' +links+ ' ' &texts= ', ' +texts+ '" &borderwidth= " ' +width+ ' &borderheight= ' +height+ ' &textheight=0 ' > ';
STR + + ' <embed src= ' ' +url+ ' ' wmode= ' opaque ' flashvars= ' pics= ' +images+ ' ' &links= ', ' +links+ ' &texts= ' ' +texts+ ' &borderwidth= ' +width+ ' &borderheight= ' +height+ ' &textheight=0 ' menu= ' false ' bgcolor= ' #ffffff ' quality= ' High "width=" ' + width + ' "height=" ' + height + ' "allowscriptaccess=" Samedomain "type=" Application/x-shockwave-flash " Pluginspage= "Http://www.macromedia.com/go/getflashplayer"/> ";
str = ' </object> ';
My_getbyid (Element). InnerHTML = str;
}
Where you need to place the slides, overwrite with the following code, or write a single file call to the following code,
If the file name is ad.asp, call:<!--in the slide area #include file= "ad.asp"-->
Copy Code code as follows:
<div id= "Story_flash" > </div>
<a target=_self href= "Javascript.:gourl ()" >
<script. Type= "Text/javascript" >
Url_0= "http://www.abc.com";
Img_0= "Yun_qi_img/01.jpg";
Url_1= "http://www.abc.com";
Img_1= "Yun_qi_img/02.jpg";
Url_2= "http://www.abc.com";
Img_2= "Yun_qi_img/03.jpg";
Url_3= "http://www.abc.com";
Img_3= "Yun_qi_img/04.jpg";
Url_4= "http://www.abc.com";
Img_4= "Yun_qi_img/05.jpg";
var focus_width=250
var focus_height=250
var text_height=0
var swf_height = Focus_height+text_height
var pics =img_0+ "|" +img_1+ "|" +img_2+ "|" +img_3+ "|" +img_4
var links=url_0+ "|" +url_1+ "|" +url_2+ "|" +url_3+ "|" +url_4
var texts = ';
var focus = ' http://www.abc.com/ad/focus.swf ';
Sunad (' Story_flash ', Focus, focus_width,swf_height,pics,links,texts)
</script>
</a>
In the code above: var focus = ' http://www.abc.com/ad/focus.swf ';
The focus.swf of this sentence is the Flash playback file