Anytime I wanted to embed a flash file to a webpage or HTML file, I would use the swfobject. Why would I use the swfobject? Well the answer is simple. XHTML valid. It’s because of me being strict on validating all my pages as XHTML 1.0 that I choose to embed my flash files with swfobject. The explanation is simple as well.
If you look at some embed codes for flash files, they give you an IFRAME tag that you can put into your webpage as well. This will pass XHTML validation, but some codes might give you attributes that XHTML does NOT allow. Some of these include “allowTransparency”, and “allowFullscreen”, which do not pass XHTML validation as those attributes do not exist. You are of course allowed to remove those attributes and have it pass as XHTML valid, but if you are a true coder, the swfobject is the way to go.