Despite a tremendous lack of XHTML compliant flash sites – it’s surprisingly simple to have a valid Flash based page.

Step 1. XML Declaration, doctype and namespace.

Step 2. Title and Meta Data (in the HEAD element – both required to validate)

Step 3. Correct object markup (“embed” is NOT valid, nor necessary, and an OBJECT must be within a block-level element (such as a DIV))

That’s it. This is handy not only for validation, but also for DOM traversal. Giving the object and ID using valid markup will register in the DOM for any browser, so the methods offered by Adobe using window[object_name] or document[object_name] aren’t necessary. This makes it much easier to manager two-way ExternalInterface communication as well.

A valid example: