tags:

views:

38

answers:

3

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://download.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?

+1  A: 

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>
digitalFresh
A: 

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

166_MMX
A: 

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

dwich