中文(繁体)
相關特效: Flash和JS實現的圖片幻燈片切換特效
最近看到各大門戶站都有一個幻燈片特效,而且不是簡單的JS特效,是FLASH和JS結合而成的覺得非常不錯,今天在搜尋IT頻道的原代碼中查看了一下,特此發布!希望大家喜歡!有什麼問題可以跟我研究!因為只是研究學習,所以建議大家使用之前一定要準備好width=410(寬) height=200(高)的圖片!我所做的不是啊! !
<TABLE cellSpacing=0 cellPadding=0 width="100% " border=0> <TBODY> <TR> <TD> <DIV align=center> <SCRIPT type=text/javascript> <!-- t=5; //secs per slide // promos + links prmo = new Array (); link = new Array(); prmo[1]="";//網頁製作學習link[1]="http://www.downcodes.com/htmldata/sort/3.html"; prmo[ 2]="";//動畫製作學習link[2]="http://www.downcodes.com/htmldata/sort/4.html"; //prmo[2]=""//網頁特效/ /link[2]="http://www.downcodes.com/htmldata/sort/5.html"; prmo[4]="";//網頁程式設計學習link[4]="http://www .downcodes.com/htmldata/sort/6.html"; prmo[0]="";//書籍教學下載link[0]="http://www.downcodes.com/htmldata/sort/7.html "; prmo[3]="";//網頁素材下載link[3]="http://www.downcodes.com/htmldata/sort/8.html"; //init promos = ""; links = ""; // build flashvars for (x=0;x<prmo.length;x++) { promos += (x+1<prmo.length) ? prmo[x]+"|" : prmo[x]; links += (x+1<prmo.length) ? link[x]+"|" : link[x]; } var MM_contentVersion = 6; var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave -flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0; if ( plugin ) { var words = navigator.plugins["Shockwave Flash"].description.split(" ") ; for (var i = 0; i < words.length; ++i) { if (isNaN(parseInt(words[i]))) continue; var MM_PluginVersion = words[i]; } var MM_FlashCanPlay = MM_PluginVersion >= MM_Version > ; } else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) { document.write('<SCR' + 'IPT LANGUAGE=VBScript> n'); //FS hide this from IE4.5 Mac by splitting the tag document.write('on error resume next n'); document.write('MM_FlashCanPlay. ("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))n'); document.write('</SCR' + 'IPT> n'); } if ( MM_FlashCanPlay ) { document.write('<object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid=object classid。 "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width= "410" height="200" align="middle">'); document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="" />< param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="wmode" value="transparent" />'); document.write(' <param name="FlashVars" value="p=' + promos + '&l=' + links + '&t=' + t + '">'); document.write('<embed src="" FlashVars=" p=' + promos + '&l=' + links + '&t=' + t + '" quality="high" bgcolor="#ffffff" width="410" height="200" align="middle" allowScriptAccess= "sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" />'); document.write('</object> '); } //--> </SCRIPT> </DIV></TD></TR></TBODY></TABLE>