Validated code for Flash, wont load in IE8

Hi All,

Am going through a site making it validate, have amended some code which displays flash but now the flash content won’t load in IE.

Could somebody possibly take a look for me?

The page is:

http://cmg.pelli.co.uk/

The code is as follows:


<object type="application/x-shockwave-flash" data="http://cmg.pelli.co.uk/images/interface/_flash/ukmoves.swf" width="325" height="312" id="household"><param name="movie" value="ukmoves.swf"/></object>

Many thanks

Been a long standing issue with IE, to get around it write your Flash to the page via JavaScript (using the old embed tags) … this way your page is valid and your Flash works.

BTW, what exactly is that Flash supposed to do? I started at if, moused over it and nothing seems to change … is it just rendering that header image? If so why not use an image?

The background fades in and the text fades in. :slight_smile:

I too recommend using javascript to embed it: http://code.google.com/p/swfobject/

Thanks a lot for all your help guys, yeah I did them as just images but flash was insisted upon :S

The following is valid html, and does not depend on javascript to hide an invalid embed tag. The conditional comments hide the alternative content from IE, since IE does not support alternative content within the object element. As an aside, notice that a p element is validly nested within a p grandparent. :slight_smile:

  <p><object type="application/x-shockwave-flash" 
             classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  
             width="724"
             height="237"
             id="household">
    <param name="movie"
           value="http://cmg.pelli.co.uk/images/interface/_flash/household.swf" />

    <!--[if !ie]>-->
    <object type="application/x-shockwave-flash"
            data="http://cmg.pelli.co.uk/images/interface/_flash/household.swf"
            width="724"
            height="237"
            id="household">

      <p>Oops!</p>
    </object>
    <!--<![endif]-->
  </object></p>

cheers,

gary