2012-05-17 28 views
1

我有Flash對象(視頻)。我想點擊它打開一個頁面。我已經完成了它在一個div內,並點擊div我打開頁面。但它不適用於Chrome和IE。它在Firefox中工作正常。我的代碼如下:如何製作可點擊的Flash視頻或點擊在asp.net中的Flash視頻打開網址?

<div class="HouseImage" onclick="window.open('Contact','_self')" style="height: 300px; 
       overflow: hidden;"> 
       <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="351" 
        height="332"> 
        <param name="movie" value="Flash/Banner.swf" /> 
        <param name="quality" value="high" /> 
        <param name="wmode" value="opaque" /> 
        <param name="swfversion" value="6.0.65.0" /> 
        <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. --> 
        <param name="expressinstall" value="Scripts/expressInstall.swf" /> 
        <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --> 
        <!--[if !IE]>--> 
        <object type="application/x-shockwave-flash" data="Flash/Banner.swf" width="351" 
         height="332"> 
         <!--<![endif]--> 
         <param name="quality" value="high" /> 
         <param name="wmode" value="opaque" /> 
         <param name="swfversion" value="6.0.65.0" /> 
         <param name="expressinstall" value="Scripts/expressInstall.swf" /> 
         <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. --> 
         <div> 
          <h4> 
           Content on this page requires a newer version of Adobe Flash Player.</h4> 
          <p> 
           <a href="http://www.adobe.com/go/getflashplayer"> 
            <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" 
             alt="Get Adobe Flash player" width="112" height="33" /></a></p> 
         </div> 
         <!--[if !IE]>--> 
        </object> 
        <!--<![endif]--> 
       </object> 
      </div> 

請儘快幫助我。提前致謝。

回答

0

最好的方法是通過flash打開鏈接。如果您無法訪問代碼,則可以編寫「特殊」Flash加載程序,該加載程序可以在其內部加載Flash/Banner.swf,並且可以使用onclick事件加載頁面。

你也可以嘗試在Flash動畫上放置透明的div或gif,但這是一個涉及絕對定位的混亂,它可能不適用於所有瀏覽器。