在HTML裡為FLASH加連結的相容方法,htmlflash

來源:互聯網
上載者:User

在HTML裡為FLASH加連結的相容方法,htmlflash

先看代碼

<div style="position:relative; width:[flash的寬]px; height:[flash的高]px;"><a href="填寫連結地址" target="_blank"    style="position:absolute; width:[flash的寬]px; height:[flash的高]px; left:0; top:0; z-index:100"></a><button style="width:[flash的寬]px;height:[flash的高]px; position:relative; z-index:1; background:transparent;border:none;padding:0;cursor:pointer;"
        onclick="window.open('填寫連結地址')"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=7,0,0,0" width="[flash的寬]" height="[flash的高]" id="Untitled-1" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="填寫flash廣告地址" /> <param name="quality" value="high" /> <param name="wmode" value="transparent"> <param name="bgcolor" value="#ffffff" /> <embed src="填寫flash廣告地址" quality="high" bgcolor="#ffffff" width="[flash的寬]" height="[flash的高]" name="mymovie" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></button>

其中a標籤是解決FF,Chrome,Opera等瀏覽器點擊不跳轉的問題,加button是解決IE瀏覽器的問題


怎給html檔案中flash加上超級連結?

一般串連都是加在 flash裡面 你可以在 <div class="logo" id="banner">
<a helf=www.ddddd.com><script language="JavaScript" type="text/javascript">
var fo = new SWFObject("images/logo.swf", "", "260", "90", "7" ,"ffffff");
fo.addParam("menu","false");
fo.addParam("wmode","transparent");
fo.write("banner");
</script></a>
</div>
 
html怎使Flash加串連代碼為何沒用?

首先,我們肯定是要先插入FLASH.因為,Flash預設是最高層.所以, 我經常會遇見Flash把下拉式功能表擋住的情況. 把Flash檔案放到一個層中,設為最底層,FLASH設為透明.
<div style="z-index:-1"> <!--1.設定FLASH為底層-->
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="download.macromedia.com/...sion=6,0,29,0"
width="200" height="115">
<param name="movie" value="media.swf">
<param name="quality" value="high">
<embed
src="media.swf" quality="high"
pluginspage="www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="200"
height="115"></embed>
<param name="wmode" value="transparent"> <!--2.必須把FLASH設定為透明-->
</object> </div>
再接下來,就是在FLASH的層上再加上一層, Flash本身不能直接加入onclick.等事件,所以,只能藉助別的東西啦. 就是在FLASH上加個透明層,
<div
id="huiLayer" style="cursor: hand; position:absolute; left:10px;
top:10px; width:200px; height:115px; z-index:1; visibility:
visible;"><a href="跳轉的連結地址">
<img src="kong.gif" width="200" height="115" border="0"&gt......餘下全文>>
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.