Truly W3C Valid Flash

October 31st, 2004 by Joen , ,

With the rising interest in so-called “web standards compliant” websites, or more accurately described – xhtml markup valid according to the W3C, it’s been a thorn in the sides of Flash developers worldwide that Internet Explorer relied on deprecated markup to present Flash content.

Drew McLellan helped us out with his Flash Satay method, that relied entirely on the object tag, as opposed to the default method also using the deprecated embed tag. This was valid XHTML, but one problem remained. Unless a “container movie” was used, Flash movies presented using the Satay method wouldn’t stream in Internet Explorer.

Until now—maybe? Thanks to discussion over at Drew’s site, I stumbled upon (Thanks Anne) a seemingly perfect and W3C valid way to embed Flash movies. Unlike the otherwise fine Flash Satay method, this method seems to stream perfectly in Internet Explorer, without extra hassles. It doesn’t even rely on hiding the embed tag using JavaScript. The method is described at Ian Hickson’s site, where a demonstration is also available.

Now if only it’s not too good to be true…

Update: Indeed it seems there are a few issues with the “Hixie” method. For one, parameters such as “salign”, don’t work with it.

I’m now recommending that you use SWFObject to embed Flash.


Websites linking to this post:

  1. Valid XHTML Flash at R. Blake Ramick :: Journal
  2. 如何在XHTML 1.0 Strict合法的前提下插入FLASH内容 | Fruitie.Weblog
  3. 如何在XHTML 1.0 Strict合法的前提下插入FLASH内容 | Standarder
  4. 如何在XHTML 1.0 Strict合法的前提下插入FLASH内容 | Nocoo.Weblog

Comments (34)

  1. Joen says:

    You should be able to set that outside of the initial flash movie as a variable, and that way you don?t need to keep changing it.

    Yes, I do think you can re-define the _root variable some how, but unless I can do it in my container .swf, it's not good enough. Take for instance an old client site that has dozens of .swf files, but only one template. If I could "validify" that site by just changing that one template, it would be great. But I don't want to change all the .swf's.

    Quote

  2. Heidi says:

    You are opening two object tags and are closing only one. That gives you an error. If you close the frist object tag before the new one, you see your Flash stuff twive f.i. in Opera Browsers.

    Too bad ....

    Quote

  3. datscharlie says:

    Flash W3C valid and search engine friendly embedding using Flash, VBScript, JavaScript and CSS. Tested in all well known frameworks, learn more at http://www.its-hofmann.com/en/flash/

    cya
    datscharlie

    Quote

  4. Ian Young says:

    In Opera, everything after the flash didn't display.

    Works fine in FF, and IE6.

    I have reverted back to old format as it works!

    Any thoughts chaps/chapesses

    Ian

    Quote

  5. Alex says:

    Just a thought but I don't see why all this bother with W3C flash validation...

    Just create a additional HTML page with no margins, embed the swf in the old fashioned way. Then use an Iframe to load this additional HTML page into the main page.

    OK... I know whay you gonna say, "DONT USE IFRAMES / FRAMES!", but since flash doesn't get spidered anyway... and the rest of your content is in the main page, what's the problem. All of these other solutions are excessive!

    W3C will not validate within the Iframe... so flash works as it should, using the normal embed method.

    This has been tested on IE and Netscape only. Please feel free to pick holes in my logic! You can see this working on my homepage http://www.dobos.co.uk

    Alex

    Quote

  6. What about this one?:
    http://www.ambience.sk/flash-valid.htm
    It seems to have valid Flash XHTML.

    Quote

  7. vijay says:

    i am not able to view the flash banner in opera and firefox browsers but the site is valid HTML 4.01 Transitional the flash colud be viewwed only in
    IE "how to view flash in all browsers with validation".

    Quote

  8. creamac says:

    I had to leave the "_root." away in the actionscript to make it work.

    It seems to me that this little piece of code is unnecessary.

    Quote

  9. Web Designer says:

    I cant understand the satay method. Is there any easy method on embedding flash?

    Quote

  10. ntiremedia says:

    Works fine in FF, and IE6.

    Quote

Comment

(required)

(required)

Textile

Textile is a method that uses simple symbols to quickly write rich text markup. These are the most common:

  • _emphasis_
  • *strong*
  • -deleted text-
  • !imageurl.gif!