2011-04-08 156 views
0

我的代碼有什麼問題?它表明在火狐狸但不是在鉻閃光燈和IE8在aspx頁面顯示flash?

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="UI_Default" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
    <style type="text/css"> 
html,body { height: 100%;width:100% } 
body { margin: 0; padding: 0; } 
</style> 
</head> 
<body bgcolor="#d3d3d3" style="margin:0px;"> 
<!--url's used in the movie--> 
<!--text used in the movie--> 
<!-- saved from url=(0013)about:internet --> 
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="100%" id="home" align="middle"> 
    <param name="allowScriptAccess" value="sameDomain" /> 
    <param name="allowFullScreen" value="false" /> 
    <param name="movie" value="home.swf" /><param name="menu" value="false" /> 
    <param name="quality" value="High" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#d3d3d3" /> 
     <embed src="../swf/home.swf" menu="false" quality="High" wmode="transparent" bgcolor="#d3d3d3" width="100%" height="100%" name="home" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> 
    </object> 
</body> 
</html> 

回答

0

使用SRC param標籤在對象 tagobject標籤

<param name="src" value="../swf/home.swf" /> 

AS

<object 
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" 
    width="100%" 
    height="100%" 
    id="home" 
    align="middle">  
    <param name="allowScriptAccess" value="sameDomain" />  
    <param name="allowFullScreen" value="false" />  
    <param name="movie" value="home.swf" /> 
    <param name="menu" value="false" />  
    <param name="quality" value="High" /> 
    <param name="wmode" value="transparent" /> 
    <param name="bgcolor" value="#d3d3d3" />   
    <param name="src" value="../swf/home.swf" />  
    <embed src="../swf/home.swf" menu="false" quality="High" wmode="transparent" bgcolor="#d3d3d3" width="100%" height="100%" name="home" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />  
</object> 

請儘量將樣品它在IE,Firefox和Chromw

<object id='mySwf' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab' style='width:100%;height:100%;'> 
      <param name="wmode" value="opaque" /> 
      <param name='src' value='../swf/home.swf'/> 
      <param name='flashVars' value=''/> 
      <embed id='embedSwf' 
       src='../swf/home.swf' 
       pluginspage='http://www.adobe.com/go/getflashplayer' 
       width='100%' height='100%' 
       flashVars='' 
       /> 
     </object> 
爲我工作
+0

謝謝,我試過了。現在它適用於IE和fire狐狸,但不適用於Chrome。爲什麼? – 2011-04-08 10:48:35

+0

請嘗試示例,它爲我工作 – Imran 2011-04-08 11:45:00

+0

問題是「電影」參數它應該更改爲「../swf/home.swf」 – 2011-04-12 19:32:54

0

它不會是一個服務器端的問題(除非你有基於用戶代理修改輸出代碼)。

問題可能是您沒有在Chrome和IE8上安裝Flash。嘗試重新安裝並運行它以查看它是否有效。