SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Zealot chrisdpucci's Avatar
    Join Date
    Dec 2006
    Location
    On the internets
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Flash <object/><embed/> XHTML Validation Issue

    Hello,

    I am running into an issue with an embeded flash object causing my xhtml document to not validate.

    The issue appears that there is no <embed> element in a well formed xhtml document.

    Now like every flash object, I have an <object> portion and an <embed> portion and when I remove the <embed> portion the page validates and the flash portion works in Safari and IE but Firefox requires the <embed> tag.

    So my question is there a way to resolve this and get my page to validate while keeping the flash object functioning in all browsers? I'm sure this is a fairly common problem so I hope the answer is something you guys can be like "yeah idiot you do this". It's just something I've ever dealt with.

    thanks,

    Chris

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)

  3. #3
    SitePoint Zealot chrisdpucci's Avatar
    Join Date
    Dec 2006
    Location
    On the internets
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm...that is not really what I was expecting. From reading that article it looks like other than building a container object for flash movies that there is no way to embed a flash object in a valid xhtml document.

    While the authors example does look like it should work, it seems much more like a hack than a solution. This is something that seems like it should be addressed by the validation commitees as flash is a component of the web that I don't expect to go anywhere anytime soon.

    Very strange that a formal solution or work around hasn't been developed yet. Either way, thanks for the reply.

    Chris

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It works, and is valid, however there are a couple issues with it. First and foremost, unless you nest some alternative content inside the object element (taking advantage of its nesting capabilities -which is exactly how embed works) the data in the object will not be accessible to those who don't have the latest Flash plugin.

    Second, the lack of a codebase means that if any Flash plugin is installed, it will try to read the Flash file that is being sent from the server.

    Third, there is an error in the article, in the final code example.

    And no, this is NOT a hack.

  5. #5
    SitePoint Zealot chrisdpucci's Avatar
    Join Date
    Dec 2006
    Location
    On the internets
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just wanted to update this thread with something that I found and think handles the issue very well:

    http://blog.deconcept.com/swfobject/

  6. #6
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There has never been any EMBED element type in any version of HTML or XHTML. It's a non-standard addition that happens to be implemented in a number of browsers, but it's not HTML or XHTML.
    Birnam wood is come to Dunsinane

  7. #7
    SitePoint Addict bcr's Avatar
    Join Date
    Dec 2004
    Location
    Perth, Australia
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  8. #8
    SitePoint Zealot kimberlybarryd's Avatar
    Join Date
    Jan 2007
    Location
    Nova Scotia, Canada
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    It Works

    Found this way to validate Flash. Works Great!
    http://www.stylehack.com/wordpress/index.php?p=77


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
  •