2011-08-10

【紫色筆記】swfobject 符合W3C標準且隨插即用的 Flash

用 DreamWeaver 插入 flash 雖然方便,但其實它是不符合W3C標準的語法!且程式勒勒長又看不懂…

我們利用 Adobe 發表的 swfobject 可以來解決其問題~

【第一步】官網的 Downloads 下載 SWFObject 2.2.zip (Uploaded:Jun 11, 2009)

【第二步】解壓縮後把「swfobject.js」檔存到你的網站資料夾中

【第三步】開啟網頁檔,把下列指令加到 <head> </head> 中


<script type="text/javascript" src="swfobject.js"></script>


【第四步】把下列程式片段加到欲插入Flash動畫的地方


<div id="mySWF">這裡是當 flash 不能正常顯示時顯示的内容</div>
<script type="text/javascript">
swfobject.embedSWF("banner.swf", "mySWF", "300", "143", "9.0.0");
</script>

  • 註:swfobject.embedSWF(swfUrl, id, width, height, version)是5個必須的參數
  • swfUrl(String)指定SWF的URL
    id(String)指定將會被Flash内容替換的HTML元素的id
    width(String)指定SWF的寬
    height(String)指定SWF的高
    version(String)指定你發佈的SWF對應之Flash Player版本(格式為:major.minor.release)


相關網站:swfobject 官方網站
參考來源:蕃茄腦袋-SWFObject 2.0 讓你輕鬆的插入及控制 Flash

3 則留言:

  1. To become a viable industrial production option, there are a couple of challenges that 4D printing should overcome. The challenges of 4D printing embody reality that|the truth that} the microstructures of those printed smart supplies have to be close to or higher than the elements CNC machining obtained via traditional machining processes. New and customizable supplies need to be developed which have the power to persistently reply to varying exterior stimuli and alter to their desired shape.

    回覆刪除
  2. At the conclusion of play, let the supplier flip faceup any cards beneath your chips. Casinos select what 다파벳 number of} decks will be used in a sport of Blackjack. The more decks used, the bigger of a bonus the supplier has over the players. This is outcome of} increased difficulty for a participant to rely cards. This form of blackjack is changing into extremely popular as a standard blackjack alternative sport. The rule change comes into impact when the supplier hits their hand with the precise whole of twenty-two.

    回覆刪除
  3. For example, a participant can guess on the ball landing on a certain number, between certain numbers, or a certain number. Unlike land-based casinos, taking part in} roulette on-line provides you the advantage of trying out video games for free. This is of important significance model spanking new|for brand new} players who nonetheless have no idea what they like. Roulette considered one of the|is among the|is likely considered one of the} video games out there to play for free, and that’s great. Since it’s a sport that may eat quickly chip through your bankroll, it’s a good idea to try 메리트카지노 it for fun before you place real cash. Their on line casino web site options greater than 50 reside vendor video games from software developers similar to Evolution Gaming, NetEnt, and Ezugi.

    回覆刪除