關(guān)于 focus.swf 調(diào)用 最近發(fā)現(xiàn)諸如qq.com sina.com.cn sohu.com 都出現(xiàn)如下圖所示的焦點(diǎn)圖片新聞,查看其網(wǎng)頁的源代碼,發(fā)現(xiàn)它們都是通過一個 Flash 文件來調(diào)用圖片,使圖片交互切換。 1 <script type="text/javascript">2 <!--3 4 var focus_width = 375; // 圖片寬度5 var focus_height= 500; // 圖片高度6 var text_height = 20; // 顯示的文字高度7 var swf_height = focus_height + text_height;8 9 var pics ="3643603.jpg|3644310.jpg|3647102.jpg|3649097.jpg|3646832.jpg|3649095.jpg|3649096.jpg";10 var links="3643603.jpg|3644310.jpg|3647102.jpg|3649097.jpg|3646832.jpg|3649095.jpg|3649096.jpg";11 var texts="3643603.jpg|3644310.jpg|3647102.jpg|3649097.jpg|3646832.jpg|3649095.jpg|3649096.jpg";12 13 document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');14 document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');15 document.write('width="'+ focus_width +'" ');16 document.write('height="'+ swf_height +'">');17 document.write('<param name="allowScriptAccess" value="sameDomain">');18 document.write('<param name="movie" value="focus.swf">');19 document.write('<param name="quality" value="high">');20 document.write('<param name="bgcolor" value="#ffffff">');21 document.write('<param name="menu" value="false">');22 document.write('<param name=wmode value="opaque">');23 document.write('<param name="FlashVars" ');24 document.write('value="pics='+pics);25 document.write( '&links='+links);26 document.write( '&texts='+texts);27 document.write( '&borderwidth='+focus_width);28 document.write( '&borderheight='+focus_height);29 document.write( '&textheight='+text_height+'">');30 document.write('<embed src="focus.swf" ');31 document.write('wmode="opaque" ');32 document.write('FlashVars="pics='+pics);33 document.write( '&links='+links);34 document.write( '&texts='+texts);35 document.write( '&borderwidth='+focus_width);36 document.write( '&borderheight='+focus_height);37 document.write( '&textheight='+text_height+'" ');38 document.write('menu="false" ');39 document.write('bgcolor="#ffffff" ');40 document.write('quality="high" ');41 document.write('width="'+ focus_width +'" ');42 document.write('height="'+ focus_height +'" ');43 document.write('allowScriptAccess="sameDomain" ');44 document.write('type="application/x-shockwave-flash" ');45 document.write('pluginspage="http://www.macromedia.com/go/getflashplayer" />');46 document.write('</object>');47 48 //-->49 </script>50 ![]() 其中變量: |
|
|