开发者

Why Flash not showing in IE

开发者 https://www.devze.com 2023-01-06 04:46 出处:网络
Hi i have created a simple menu in Flash. I have added the following code to my page and it works perfectly in Firefox but doesn t show in IE

Hi i have created a simple menu in Flash. I have added the following code to my page

and it works perfectly in Firefox but doesn t show in IE

<embed height="50" width="540" 
      align="middle" 
      type="application/x-shockwave-flash" 
      salign="" 
      allowscriptaccess="sameDomain" 
      allowfullscreen="false" 
      menu="true" 
      name="main" 
      bgcolor="#ffffff" 
      devicefont="false" 
      wmode="window" 
      scale="showall" 
      loop="true" 
      play="true" 
      pluginspage="http://www.adobe.com/go/getflashplayer" quality="high" src="/Flash/main.swf"></embed>

What is more the embed is not recognized bi Visual studio

Any idea what is the problem? Thanks EDIT

I have modified the code as suggested

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
        codebase="http://d开发者_运维知识库ownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="540" height="50">        
        <param name="main" value="/Flash/main.swf" />
        <param name="play" value="true"/>
        <param name="loop" value="true"/>
        <param name="scale" value="showall"/>
        <param name="wmode" value="window"/>
        <param name="menu" value="true"/>
        <param name="allowFullScreen" value="false"/>
        <param name="allowScriptAccess" value="sameDomain"/>
        <param name="quality" value="high" />        
        <embed height="50" width="540" 
          align="middle" 
          type="application/x-shockwave-flash" 
          salign="" 
          allowscriptaccess="sameDomain" 
          allowfullscreen="false" 
          menu="true" 
          name="main" 
          bgcolor="#ffffff" 
          devicefont="false" 
          wmode="window" 
          scale="showall" 
          loop="true" 
          play="true" 
          pluginspage="http://www.adobe.com/go/getflashplayer" quality="high" src="/Flash/main.swf"></embed>
    </object>      

but still no luck

Any idea what is wrong?


IE does not support the embed standards. You need to use an object and param tags with an embed tag inside and apply the attributes to both to ensure it is supported by IE and modern browsers.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="540" height="50">
<param name="movie" value="/Flash/main.swf" />
<!-- other params -->

<!-- put embed tag here -->

</object>


Because IE dose not understand the embed tag.

Flash uses an AciveX component for IE to render Flash. These require an object tag.

Here is KB article of Adobe that shows how to embed Flash movies so that they work cross browser wide.

http://kb2.adobe.com/cps/415/tn_4150.html


I think some people just ask a question before they search the web for the answer.

If you ask google:how to embed flash in browser, you'll get thousands of results.

Simply: use OBJECT and EMBED.

More info here: http://kb2.adobe.com/cps/415/tn_4150.html


You may not have it enabled.

  1. Open Internet Explorer
  2. Click on "Tools"
  3. Click on "Manage Add-ons"
  4. Under "Adobe Systems Incorporated" find "Shockwave Flash Object"
  5. If this is your problem the status will show "Disabled"
  6. Highlight the entire entry and click on "Enable" at the bottom of the page.
  7. Status should now read "Enabled"
0

精彩评论

暂无评论...
验证码 换一张
取 消