{"id":524,"date":"2010-03-03T23:11:58","date_gmt":"2010-03-04T03:11:58","guid":{"rendered":"http:\/\/www.blizzarddigital.com\/blog\/?p=524"},"modified":"2010-04-18T19:33:53","modified_gmt":"2010-04-18T23:33:53","slug":"valid-flash-embed","status":"publish","type":"post","link":"https:\/\/www.blizzarddigital.com\/blog\/valid-flash-embed\/","title":{"rendered":"Valid Flash Embed &#8211; Make That YouTube Embed Valid!"},"content":{"rendered":"<p>Hola! It&#8217;s been a while. I&#8217;ve got another gripe, and this time it&#8217;s with Flash embed code!<\/p>\n<p>Most of the embed code I see for Flash movies is invalid, usually containing the non-existent <code>embed<\/code> element or some-such. Even the code provided by YouTube for embedding videos contains <code>embed<\/code>. This can easily be thrown out and will\u2014probably most of the time\u2014instantly make your code valid.<\/p>\n<p>Here&#8217;s an example (in XHTML) of a valid Flash embed that works in at least IE6+, Firefox, and Safari:<\/p>\n<p><code>&lt;object data=\"flash.swf\" type=\"application\/x-shockwave-flash\" width=\"320\" height=\"240\"&gt;<br \/>\n&lt;param name=\"movie\" value=\"flash.swf\" \/&gt;<br \/>\n&lt;\/object&gt;<\/code><\/p>\n<p>That&#8217;s all there is to it. Adjust the parameters and add additional <code>param<\/code> elements as necessary. If your Flash movie requires variables, just add an extra <code>param<\/code> as follows:<\/p>\n<p><code>&lt;param name=\"flashvars\" value=\"arg1=foo&amp;amp;arg2=bar\" \/&gt;<\/code><\/p>\n<p>If you place additional elements inside the <code>object<\/code> element, it will act as a fallback, displaying if the Flash plugin isn&#8217;t installed. For example:<\/p>\n<p><code>&lt;object data=\"flash.swf\" type=\"application\/x-shockwave-flash\" width=\"320\" height=\"240\"&gt;<br \/>\n&lt;param name=\"movie\" value=\"flash.swf\" \/&gt;<br \/>\n&lt;img src=\"fallback.jpg\" alt=\"Flash Didn't Load!\" \/&gt;<br \/>\n&lt;\/object&gt;<\/code><\/p>\n<p>That&#8217;s all for now. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Find out how to make that YouTube embed valid.<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[152,151,103,88,61,22,21,183,19],"class_list":["post-524","post","type-post","status-publish","format-standard","hentry","category-web-standards","tag-embed-code","tag-flash","tag-html","tag-markup","tag-tips","tag-validation","tag-w3c","tag-web-standards","tag-xhtml"],"_links":{"self":[{"href":"https:\/\/www.blizzarddigital.com\/blog\/wp-json\/wp\/v2\/posts\/524","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blizzarddigital.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blizzarddigital.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blizzarddigital.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blizzarddigital.com\/blog\/wp-json\/wp\/v2\/comments?post=524"}],"version-history":[{"count":8,"href":"https:\/\/www.blizzarddigital.com\/blog\/wp-json\/wp\/v2\/posts\/524\/revisions"}],"predecessor-version":[{"id":537,"href":"https:\/\/www.blizzarddigital.com\/blog\/wp-json\/wp\/v2\/posts\/524\/revisions\/537"}],"wp:attachment":[{"href":"https:\/\/www.blizzarddigital.com\/blog\/wp-json\/wp\/v2\/media?parent=524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blizzarddigital.com\/blog\/wp-json\/wp\/v2\/categories?post=524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blizzarddigital.com\/blog\/wp-json\/wp\/v2\/tags?post=524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}