SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist Sikwondo's Avatar
    Join Date
    Sep 2005
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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:

    Code:
    <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

  2. #2
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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?

  3. #3
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The background fades in and the text fades in.

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

  4. #4
    SitePoint Evangelist Sikwondo's Avatar
    Join Date
    Sep 2005
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot for all your help guys, yeah I did them as just images but flash was insisted upon :S

  5. #5
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(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.
    Code:
      <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
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •