1. Create a new JS file and add the following code: block the right-click FLASH
Function tmh _ make_ad_fodder (src, width, height)
{
Src = src. replace ("","");
Var TEMP_IMAGE = ' ';
Var TEMP_FLASH = '<object classid = "clsid: D27CDB6E-AE6D-11cf-96B8-444553540000 "'
+ 'Codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0 "'
+ 'Height = "$ height $" width = "$ width $">'
+ '<Param name = "movie" value = "$ src $"/>'
+ '<Param name = "quality" value = "high"/>'
+ '<Param name = "wmode" value = "opaque"/>'
+ '<EMBED src = "$ src $" quality = "high" WIDTH = "$ width $" HEIGHT = "$ height $ "'
+ 'Wmode = "opaque" TYPE = "application/x-shockwave-flash "'
+ 'Ininspage = "http://www.macromedia.com/shockwave/download/index.cgi? P1_Prod_Version = ShockwaveFlash "> </EMBED>'
+ '</Object> ';
Return (/\. swf $/gi. test (src) = true? TEMP_FLASH: TEMP_IMAGE)
. Replace (/\ $ src \ $/gi, src)
. Replace (/\ $ width \ $/gi, width)
. Replace (/\ $ height \ $/gi, height)
;
}
Function tmh _ make_ad_content (strImageUrl, strImageName, iWidth, iHeight, strClickUrl, blClickCover)
{
Var TEMP_LINK = '$ ad_fodder $ ';
Var TEMP_COVER = '<div style = "width: $ width $ px; height: $ height $ px ;'
+ 'Position: absolute; background-color: #000000; z-index: 9999 ;'
+ 'Filter: Alpha (Opacity = 0); opacity: 0.0; minimum Opacity: 0.0; KhtmlOpacity: 0.0; "> </div>'
+ '$ Ad_fodder $ ';
Var src = strImageName | strImageUrl;
Var width = parseInt (iWidth );
Var height = parseInt (iHeight );
Var click_url = strClickUrl | "http://www.jalaobiao.cn /";
Var ad_fodder = tmh _ make_ad_fodder (src, width, height );
If (/\. swf $/gi. test (src) = false ){
Return TEMP_LINK
. Replace (/\ $ ad_fodder \ $/gi, ad_fodder)
. Replace (/\ $ click_url \ $/gi, click_url)
;
}
// Flash
If (blClickCover = false ){
Return ad_fodder;
}
Return TEMP_COVER
. Replace (/\ $ width \ $/gi, width)
. Replace (/\ $ height \ $/gi, height)
. Replace (/\ $ click_url \ $/gi, click_url)
. Replace (/\ $ ad_fodder \ $/gi, ad_fodder)
;
}
Function taoshaw_unright_shazi (strImageUrl, strImageName, iWidth, iHeight, strClickUrl, blClickCover)
{
Document. write (tmh _ make_ad_content (strImageUrl, strImageName, iWidth, iHeight, strClickUrl, blClickCover ));
}
Function tmh _ show_pop_ad_content (csPopSpanObj, strImageUrl, strImageName, iWidth, iHeight, strClickUrl, blClickCover)
{
Var strScript = tmh _ make_ad_content (strImageUrl, strImageName, iWidth, iHeight, strClickUrl, blClickCover );
CsPopSpanObj. innerHTML = strScript;
}
Save as "flash. js ".
2. Add code to HTML, ASP, and other pages for FLASH:
<Script language = "JavaScript" type = "text/javascript" src = "flash. js"> </script>
<Script language = "javascript"> taoshaw_unright_shazi ('_ parent', 'youfor2.swf ', '000000', '000000', "", true); </script>