1

經過漫長的一天在網上搜索,我沒有找到任何解決我的問題。swfObject嵌入的對象不工作ie11

我加載使用SWFObject在我的網頁中的SWF文件中的問題,並沒有在IE11工作(在ie8-10工作正常,Firefox和Chrome)

這裏是我的背景: 這是初始化在PARAMS通過SwfObject的發送到IE `

// For version detection 
var swfVersionStr = "10.0.0"; 

// To use express install, set to playerProductInstall.swf 
var xiSwfUrlStr = "commun/swf/playerProductInstall.swf"; 

//FlashVars : contains an url used for an http request that returns the crossdomain.xml file with the crossDomainPolicy... 
var flashvars = { 
    crossdomainURL : httpOrigin + "the.url.to.crossdomain.policy.file" 
}; 

var params = {}; 
params.quality = "high"; 
params.bgcolor = "white"; 
params.allowscriptaccess = "sameDomain"; 
params.allowfullscreen = "true"; 
var attributes = {}; 
attributes.id = "dematMultiuploader"; 
attributes.name = "dematMultiuploader"; 
attributes.align = "middle"; 
swfobject.embedSWF(
    "the/url/to/SWFfile.swf", "falshContentID", 
    "550", "280", 
    swfVersionStr, xiSwfUrlStr, 
    flashvars, params, attributes); 

` 這是我的對象標記

<noscript> 
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="280"  id="dematMultiuploader"> 
     <param name="movie" value="path/to/swf/file.swf" /> 
     <param name="quality" value="high" /> 
     <param name="bgcolor" value="white" /> 
     <param name="allowScriptAccess" value="sameDomain" /> 
     <param name="allowFullScreen" value="true" /> 
     <!--[if !IE]>--> 
     <object type="application/x-shockwave-flash" data="gedemat/gecco/piece/pieceDocument.create.swf" 
      width="350" height="130" id="dematMultiuploader"> 
      <param name="quality" value="high" /> 
      <param name="bgcolor" value="white" /> 
      <param name="allowScriptAccess" value="sameDomain" /> 
      <param name="allowFullScreen" value="true" /> 
      <!--<![endif]--> 
      <!--[if gte IE 6]>--> 
      <p>Either scripts and active content are not permitted to run or 
       Adobe Flash Player version 10.0.0 or greater is not installed.</p> 
      <!--<![endif]--> 
      <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" /> 
      </a> 
      <!--[if !IE]>--> 
     </object> 
     <!--<![endif]--> 
    </object> 
</noscript> 

正如你所看到的,IE的Object標籤中沒有flashVars參數,這可能是問題嗎?

可能是IE更改IE11的一些參數名稱,如crossDomainUrl?

我試過已經把flashvars參數放在crossDomain url的對象標籤中,但它不起作用。

在Firefox和Chrome我得到這個錯誤:

NetworkError:404未找到 - http://localhost:8080/crossdomain.xml

於是,他們嘗試直接在服務器的根目錄加載該文件沒有任何成功,但它仍然有效因爲在調用之前crossdomain.xml已經被加載。也許IE在那個特定時刻找到這個文件有困難?沒有考慮到之前加載的那些?

任何想法?

+0

不要使用閃光燈,並在上帝的面上不使用Internet Explorer)http://www.infoworld.com/article/2609519/microsoft-windows/ie11-leaves-flash-media-掛在youtube上 - more-major-sites.html – IonicBurger 2014-12-05 13:01:25

+0

只有開玩笑,我確實看到一個雖然「falshContentID」應該可能是「flashContentID」? – IonicBurger 2014-12-05 13:02:30

+0

感謝您的迴應和文章:)但顯然阻止客戶端不使用Internet Explorer不是我的解決方案... – user3099620 2014-12-05 14:33:19

回答

1

找到解決方案! 的Internet Explorer 11的官方文檔中,我發現這個:

The preinstalled version of Adobe Flash isn't supported on Internet Explorer 11 running on either Windows 7 SP1 or Windows Server 2008 R2 with SP1. However, you can still download and install the separate Adobe Flash plug-in.

這裏的鏈接到它:http://technet.microsoft.com/en-us/library/dn268945.aspx

因爲我乳寧在Windows 7 SP1我重新安裝了,一切重新工作。

http://get.adobe.com/fr/flashplayer/otherversions/

-1

falshContentID沒有在html部分找到。刪除整個對象標籤,並在html區域中添加以下代碼 。

<div id="falshContentID"></div>