<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Code.Clarified</title>
	<atom:link href="http://codeclarified.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://codeclarified.com</link>
	<description>Home of Jason LeVan - HTML, CSS, jQuery Developer</description>
	<lastBuildDate>Sun, 03 Oct 2010 17:08:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Michael Austin Productions Site</title>
		<link>http://codeclarified.com/portfolio/michael-austin-productions-site/</link>
		<comments>http://codeclarified.com/portfolio/michael-austin-productions-site/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 04:54:40 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://codeclarified.com/?p=40</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a class="port_image" href="http://codeclarified.com/wp-content/uploads/2009/08/mapfull3.jpg"><img src="http://codeclarified.com/wp-content/uploads/2009/08/mapfull3-1024x736.jpg" alt="Michael Austin Productions Home Page" title="Michael Austin Productions Home Page" width="624" height="448" class="aligncenter size-large wp-image-43" /></a></p>
<p><a class="port_image" href="http://codeclarified.com/wp-content/uploads/2009/08/mapfull2.jpg"><img src="http://codeclarified.com/wp-content/uploads/2009/08/mapfull2-1024x898.jpg" alt="Michael Austin Productions Works Page" title="Michael Austin Productions Works Page" width="624" height="548" class="aligncenter size-large wp-image-42" /></a></p>
<p><a class="port_image" href="http://codeclarified.com/wp-content/uploads/2009/08/mapfull1.jpg"><img src="http://codeclarified.com/wp-content/uploads/2009/08/mapfull1-892x1024.jpg" alt="Michael Austin Productions Profile Item" title="Michael Austin Productions Profile Item" width="624" height="716" class="aligncenter size-large wp-image-41" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://codeclarified.com/portfolio/michael-austin-productions-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Valid Embedding of Flash Objects</title>
		<link>http://codeclarified.com/development/valid-embedding-of-flash-objects/</link>
		<comments>http://codeclarified.com/development/valid-embedding-of-flash-objects/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 22:25:12 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://codeclarified.com/?p=11</guid>
		<description><![CDATA[Recently I was working on a client&#8217;s website and had to embed a simple Flash slideshow in the header. Now I&#8217;m not sure if I&#8217;ve just overlooked this in the past, but I realized that my page was not validating because of the &#60;embed&#62; tags so popularly used to place Flash on pages today (I... <a href="http://codeclarified.com/development/valid-embedding-of-flash-objects/">Read More</a>]]></description>
			<content:encoded><![CDATA[<p>Recently I was working on a client&#8217;s website and had to embed a simple Flash slideshow in the header. Now I&#8217;m not sure if I&#8217;ve just overlooked this in the past, but I realized that my page was not validating because of the <code>&lt;embed&gt;</code> tags so popularly used to place Flash on pages today (I don&#8217;t work with much Flash to be honest, I&#8217;ve been turned off of it for the most part due to traumatizing experiences throughout the 90&#8242;s and early 2000&#8242;s). So, off I went to search for a fix to this -surely with all of the Flash based sites out there, some had to be valid. That is when I came across <a href="http://www.alistapart.com/articles/flashsatay">Drew McLellan&#8217;s article at A List Apart</a>, an amazing resource, and I began reading, thinking, and devising&#8230;</p>
<p>Embedding Flash objects is a wildly popular practice on the web. This in and of itself isn&#8217;t a bad thing, albeit, like many technologies which have graced the web since its creation, has been improperly implemented in many ways. This is in large part thanks to everyone&#8217;s favorite browser, Internet Explorer.</p>
<p>It is a widely held belief that browsers other than IE read Flash files using the <code>&lt;embed&gt;</code> tag. Although this method works, it is not a valid method of including Flash files. Why then is it that we can&#8217;t just use the <code>&lt;object&gt;</code> tag and be done with the whole ordeal?</p>
<p>This is where Internet Explorer makes a mess of things for everyone else. By improperly using the <em>classid</em> attribute as well as the <em>codebase</em> attribute the <code>&lt;object&gt;</code> tag is rendered useless in most browsers.</p>
<p><em>classid</em> is used to define the object to the browser. Internet Explorer uses a proprietary value here to define the player type. This can however, be replaced in most browsers by using the <em>type</em> attribute, in the case of Flash, setting it to <em>&#8220;application/x-shockwave-flash&#8221;</em>.</p>
<p><em>codebase</em> is commonly used to check the version of the object to ensure it is sufficiently up to date. The path specified in this attribute is meant to be a relative URI within the domain from which the object is called. Internet Explorer <code>&lt;object&gt;</code> tags use this attribute to link to the Flash update page. By using an external link, the <code>&lt;object&gt;</code> tag is rendered useless in most browsers.</p>
<p>So, using proper markup, the <code>&lt;object&gt;</code> tag should look like this:</p>
<pre class="code_block"><code>&lt;object type="application/x-shockwave-flash" data="/{path-to}/movie.swf" width="300" height="300"&gt;
&lt;/object&gt;
</code></pre>
<p>This will work fine in most browsers, however, as documented by Drew McLellan, this will cause Internet Explorer not to properly stream the movie, as Drew said, this is fine for smaller movies, yet streaming videos other large Flash movies, this is unacceptable. Drew created the Satay method back in 2002, which uses a small container movie to load the larger movie, allowing Internet Explorer to stream the large files. This is an interesting method to me, using the <em>data</em> to not only call up the container movie, but pass it a variable to load the actual movie. I&#8217;d like to try and make a working solution without using a Flash container movie (I&#8217;m not much of a Flash developer, I like to play with markup, and I want to see how we can get this to work with only markup).</p>
<p>My thought on how to incorporate movies comes with the use of another proprietary hack, however, one that has become quite commonplace in the web world without much concern. Instead of using a container movie, I&#8217;ve decided to use conditional comments to serve up one <code>&lt;object&gt;</code> to IE, using the wonderful proprietary settings that Microsoft has decided it would be proper to use, and serve up a properly formatted <code>&lt;object&gt;</code> to the rest of the browsers out there. So, that brings us to:</p>
<pre class="code_block"><code>&lt;!-- NON-IE --&gt;
&lt;!--[if !IE]&gt;--&gt;
&lt;object type="application/x-shockwave-flash" data="{path-to}/movie.swf" width="300" height="300"&gt;
&lt;/object&gt;
&lt;!--&lt;![endif]--&gt;
&lt;!-- IE --&gt;
&lt;!--[if IE]&gt;
&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="300" height="300"&gt;
    &lt;param name="movie" value="{path-to}/movie.swf" /&gt;
&lt;/object&gt;
&lt;![endif]--&gt;
</code></pre>
<p>Mind you, this is a VERY basic implementation of a Flash movie, you will probably want additional <code>&lt;param&gt;</code> tags and attributes in the <code>&lt;object&gt;</code> tags to properly format your movie, but for clarity and proof of concept, I&#8217;m keeping things bare-bones simple.</p>
<p>It should also be noted that this method uses little version detection. At present I am unable to test this method using previous versions of the Flash player, I would hope that if the version is out of date, the content within the <code>&lt;object&gt;</code> tags will be read and the user will be prompted to upgrade, however at this time I am unable to confirm this.</p>
<p>Now this is all well and good for hard coded websites, however, with blogs now taking up quite a bit of the Internet&#8217;s real estate these days, and WordPress sitting high on the popularity charts, a problem arises. Many folks out there would like to embed Flash movies within their posts. The method I outlined above will not work with WordPress as the WordPress editor will not properly support conditional comments for posts (alright, so the entire idea of conditional comments is improper&#8230; but such is life). As such, I have come up with a bit of a workaround, which I&#8217;m not going to lie, is a bit messy and convoluted -</p>
<p>My method to solve this is, instead of using conditional comments, simply include both <code>&lt;object&gt;</code> codes, and give each a different class, ie. <em>ieflash</em> for the Internet Explorer version, and <em>standardflash</em> to the standard <code>&lt;object&gt;</code> code. In your standard stylesheet, give the Internet Explorer class a <em>display: none;</em> and in your IE specific stylesheet (let&#8217;s face it you have one in your site, and if you don&#8217;t I say both &#8220;congratulations&#8221; and &#8220;sorry, but make a simple one for these two lines&#8221;) reset the <em>ieflash</em> style to <em>display: block;</em> and set the <em>standardflash</em> class to <em>display: none;</em></p>
<p>As the browser should not try and render items with a style of <em>display: none;</em> I am assuming that this will not adversely affect load times, as well as fact that both of the movies will be the same file and as such it should only be downloaded once anyway (please let me know if I am mistaken in this thought).</p>
<p>The reasons for these styles are two-fold: browsers will try and block out space for both movies, even if they only display one or the other, causing problems in the layout of your post, as well as the fact that certain browsers (I&#8217;ve seen this with Webkit based browsers &#8211; Chrome and Safari), will display both the IE coded Flash object, and the standards based object.</p>
<p>So, test these methods out for yourself, let me know your thoughts on the subject, any improvements, ideas, or comments are of course welcome, and be sure to read up on the subject. Although an older resource, Drew McLellan&#8217;s post at <a href="http://www.alistapart.com/articles/flashsatay">A List Apart</a> is an excellent resource and has given me much more insight on embedding Flash objects on my pages. I will continue to work on streamlining this method, as well as ensuring as wide ranging support for browsers as possible.</p>
<p>Of course I couldn&#8217;t post this without an included Flash movie, so here&#8217;s a little something from YouTube:<br />
<object class="flash_standard" type="application/x-shockwave-flash" data="http://www.youtube.com/v/HJCOpYd499E&#038;hl=en&#038;fs=1&#038;" width="425" height="344"><param name="wmode" value="transparent" /><span>Your browser does not support this version of Flash, please <a href="http://get.adobe.com/flashplayer/">upgrade</a></span></object><br />
<object class="flash_ie" type="application/x-shockwave-flash" width="425" height="344"><param name="wmode" value="transparent" /><param name="movie" value="http://www.youtube.com/v/HJCOpYd499E&#038;hl=en&#038;fs=1&#038;" /><param name="quality" value="high" /><span>Your browser does not support this version of Flash, please <a href="http://get.adobe.com/flashplayer/">upgrade</a></span></object></p>
<p>Edit: After looking back on this method, it may not be the best solution for WordPress based posts. The only real difference between the two <code>&lt;object&gt;</code> tags is where the video is called from, the standards movie uses the <em>data</em> attribute, however this causes IE to not stream the movie correctly, and instead to allow streaming, uses a <code>&lt;param&gt;</code> tag to point to the movie. Given that this is the only difference, it may be better to use Javascript to strip the <em>data</em> attribute from the <code>&lt;object&gt;</code> tag(s). This is relying on the idea that hopefully if your audience is using a plugin such as Flash player, they have Javascript enabled, not a long-shot assumption by any means, but my goal in this was to find a pure HTML based solution.</p>
<p>The real trick with this has been integration with WordPress. The conditional comment method I mentioned will allow you to embed the default, nasty <code>&lt;object&gt;</code> tag that IE likes, without it counting against your markup validation &#8211; although this is based on a bit of a hack, so I&#8217;m sure critics may call me out on this (sorry, I&#8217;m not in on developing IE, we as developers just have to deal with it).</p>
<p>Again, this method really doesn&#8217;t have a strong check to ensure proper version of Flash player either. It relies on a very basic default check. Those who work more with Flash may have a better solution to this &#8211; if your Flash movie requires a very recent version of the plugin, this method may not be for you.</p>
<p>Comments, thoughts, ramblings on the subject all welcomed, let me know how you feel about this method</p>
]]></content:encoded>
			<wfw:commentRss>http://codeclarified.com/development/valid-embedding-of-flash-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome to Code.Clarified</title>
		<link>http://codeclarified.com/general/welcome-to-code-clarified/</link>
		<comments>http://codeclarified.com/general/welcome-to-code-clarified/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 06:19:50 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://codeclarified.com/?p=6</guid>
		<description><![CDATA[Hello to all, my name is Jason LeVan. I&#8217;m a web developer specializing in WordPress, web standards, and emerging web technologies. I focus on writing valid semantic markup. This site is written using HTML5 structured markup and CSS3 is used to enhance portions of the site for modern browsers, without lessening the experience for users... <a href="http://codeclarified.com/general/welcome-to-code-clarified/">Read More</a>]]></description>
			<content:encoded><![CDATA[<p>Hello to all, my name is Jason LeVan. I&#8217;m a web developer specializing in WordPress, web standards, and emerging web technologies. I focus on writing valid semantic markup. This site is written using HTML5 structured markup and CSS3 is used to enhance portions of the site for modern browsers, without lessening the experience for users with older browsers. I strive to ensure that my code allows for accessability and a quality user experience. Progressive enhancement and graceful degradation are methods I work to incorporate in my code.</p>
<p>Here I will showcase my work and personal projects related to HTML, CSS, and jQuery as I learn and develop new practices and a better understanding of the progression of the web and its related technologies.</p>
<p>If you would like more information about my work please feel free to <a href="/about/">contact me</a>. Also, be sure to check out <a href="http://michaelaustinproductions.com">Michael Austin Productions</a>, brainchild of Michael Austin, showcasing works we have created.</p>
<p>Check back soon for projects and updates</p>
]]></content:encoded>
			<wfw:commentRss>http://codeclarified.com/general/welcome-to-code-clarified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

