Evening Tip: Insert Flash The Correct Way
You create your site the right way. You follow all of the rules, so that in the end, you can proudly have a link to w3′s validator, confirming your site’s perfection. There’s just one problem: if you embed any flash into your page, you’ll get several errors. That’s because the embed tag is not a valid tag. You need to insert your flash the correct way!
What Not To Do
<embed src="player.swf" width="300" height="300" allowscriptaccess="always" allowfullscreen="true" />
This is the simplified version. If you generate the default HTML web page directly from flash, it’s ten times more ugly. In fact, it just might be longer than this article – Just to embed a single flash file! And it doesn’t even do it with valid HTML (in fact 19 errors).
This is the result. As you can see, there are 6 errors. All 6 from the embed element (5 from the
attributes, and 1 from the tag itself)
What You Should Do
First of all, you shouldn’t use the embed tag at all. Forget it! Since we don’t have “embed” any more, we’re only left with the object tag. It’s a good thing that all browsers support it in some way!
Within the Object tag we will use the following attributes:
type=”"
data=”"
width=”"
height=”"
We’ll need to specify the MIME type of what we’re inserting. In this case, we’re inserting flash. So for the type attribute, we specify “application/x-shockwave-flash”. We declare the source through the data attribute. I think everyone can guess what the width and height attributes do. So this is how you should insert your flash, for validity:
<object type="application/x-shockwave-flash" data="flash.swf" width="750" height="400"> <param name="movie" value="flash.swf" /> </object>
You still need the <param> tag as well. Let’s test this new code now:
Final Words
Isn’t that “congratulations page” just so…validating? No pun intended. Anyway, I hope you found this to be useful, and have a great week!

You just saved me a headache!
thanks
Hello!
cialis , cialis , cialis , viagra , cialis ,
Hi, do you think, if you make as you wrote in your comunity, then something will happen? Or, you can not even try? Something like that I’ve seen this blog
I don’t like the sound of all those lists he’s making – it’s like prepossessing too many notes at high school; you sensible of you’ve achieved something when you haven’t.
hi…need help to insert swf file into a header. . thx