<?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>eightdotthree &#187; Code</title>
	<atom:link href="http://www.eightdotthree.net/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eightdotthree.net</link>
	<description>eightdotthree.net is maintained for me to share, learn and experiment. Through monthly posting I hope to find my writing voice, develop as a designer and maybe provide something interesting. &#60;p&#62;Hosting provided by &#60;a href=&#34;http://www.dreamhost.com/rewards.cgi?eightdotthree&#34;&#62;Dreamhost.&#60;/a&#62;&#60;/p&#62;</description>
	<lastBuildDate>Sat, 24 Dec 2011 14:31:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Launch Maps App from PhoneGap</title>
		<link>http://www.eightdotthree.net/2011/11/launch-maps-app-from-phonegap/</link>
		<comments>http://www.eightdotthree.net/2011/11/launch-maps-app-from-phonegap/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 19:54:51 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.eightdotthree.net/?p=516</guid>
		<description><![CDATA[If you need to launch the maps application from a PhoneGap application you can do so by editing your AppDelegate.m file with the code below. If you&#8217;re not using ChildBrowser you can comment out the else condition. Archived here for my own sake from the PhoneGap Google Group. - (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest: (NSURLRequest *)request navigationType: [...]]]></description>
			<content:encoded><![CDATA[<p>If you need to launch the maps application from a PhoneGap application you can do so by editing your AppDelegate.m file with the code below. If you&#8217;re not using ChildBrowser you can comment out the else condition.</p>

<p>Archived here for my own sake from <a href="http://groups.google.com/group/phonegap/browse_frm/thread/76534d7bf38b5a87/574b0cb517d06d8c?lnk=gst&#038;q=map#574b0cb517d06d8c">the PhoneGap Google Group.</a></p>

<p><code>
- (BOOL)webView:(UIWebView *)theWebView
    shouldStartLoadWithRequest: (NSURLRequest *)request
    navigationType: (UIWebViewNavigationType)navigationType 
{
    NSURL *url = [request URL];</p>

<pre><code>if (![[url scheme] hasPrefix:@"http"] ||
    [[url scheme] isEqualToString:@"gap"] || 
    [url isFileURL] )
{ 
    return [super webView:theWebView shouldStartLoadWithRequest:request 
        navigationType:navigationType]; 
}
else
{ 
    ChildBrowserViewController* childBrowser = [[ChildBrowserViewController alloc] 
                                                initWithScale:FALSE]; 
    [super.viewController presentModalViewController:childBrowser animated:YES ]; 
    [childBrowser loadURL:[url description]]; 
    [childBrowser release]; 
    return NO; 
}
</code></pre>

<p>}
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.eightdotthree.net/2011/11/launch-maps-app-from-phonegap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5, CSS3, Microformats and Disqus</title>
		<link>http://www.eightdotthree.net/2011/01/html5-css3-microformats-and-disqus/</link>
		<comments>http://www.eightdotthree.net/2011/01/html5-css3-microformats-and-disqus/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 19:24:39 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Microformats]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[WordPress Plugin]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[XHTML/CSS]]></category>

		<guid isPermaLink="false">http://www.eightdotthree.net/?p=430</guid>
		<description><![CDATA[I can add captions to photos I spent the weekend updating this site to HTML5, CSS3 and Disqus in an effort to refresh things and learn more about the new technologies for work. I haven&#8217;t made any effort to test for IE compatibility yet, and I don&#8217;t know when I will. I created this theme [...]]]></description>
			<content:encoded><![CDATA[<div class="right">
<a href="http://www.flickr.com/photos/eightdotthree/5310110859/" title="An older couple enjoys the view by eightdotthree, on Flickr"><img src="http://farm6.static.flickr.com/5202/5310110859_6ea63d0c05_m.jpg" width="240" height="179" alt="An older couple enjoys the view" /></a><br />
I can add captions to photos
</div>

<p>I spent the weekend updating this site to <a href="http://www.w3.org/html/logo/">HTML5</a>, CSS3 and <a href="http://www.disqus.com/">Disqus</a> in an effort to refresh things and learn more about the new technologies for work. I haven&#8217;t made any effort to test for IE compatibility yet, and I don&#8217;t know when I will.</p>

<p>I created this theme in 2008 so it needed a fresh coat of paint and the hope is that with this update I can move forward with a couple ideas I&#8217;ve had for a long time now. No pressure though.</p>

<p>I also updated my sidebar to support <a href="http://wordpress.org/">WordPress</a> <a href="http://codex.wordpress.org/WordPress_Widgets">widgets</a> and marked up my contact page with the <a href="http://microformats.org/wiki/hcard">hCard microformat</a>.</p>

<h2>some of the tools I used</h2>

<ul>
<li><a href="http://wordpress.org/extend/plugins/twitter-tools/">Twitter Tools</a></li>
<li><a href="http://eightface.com/wordpress/flickrrss/">flickrRSS</a></li>
<li><a href="http://html5boilerplate.com/">HTML5 Boilerplate</a></li>
<li><a href="http://disqus.com/">Disqus</a></li>
</ul>

<p>Critique my code and design in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eightdotthree.net/2011/01/html5-css3-microformats-and-disqus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML 5&#8242;s &#8220;real deal&#8221; video player</title>
		<link>http://www.eightdotthree.net/2010/02/html-5s-real-deal-video-player/</link>
		<comments>http://www.eightdotthree.net/2010/02/html-5s-real-deal-video-player/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 22:32:59 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Trouble!]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[XHTML/CSS]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[html 5]]></category>

		<guid isPermaLink="false">http://www.eightdotthree.net/?p=331</guid>
		<description><![CDATA[update, 2010-02-03 &#8211; Tried it again this morning and had the same results. CPU spikes well over 100% and the UI is unusable. John Gruber writes, Seriously, this is the real deal — full-screen H.264 playback with no Flash, no browser plugins, full iPhone OS support, and sane CPU usage, better in every single regard [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>update, 2010-02-03 &#8211; Tried it again this morning and had the same results. CPU spikes well over 100% and the UI is unusable.</li>
</ul>

<p><a href="http://daringfireball.net/">John Gruber</a> writes,</p>

<blockquote>
Seriously, this is the real deal — full-screen H.264 playback with no Flash, no browser plugins, full iPhone OS support, and sane CPU usage, better in every single regard than any video player ever made with Flash.
</blockquote>

<p><a href="http://jilion.com/sublime/video">Have a look for yourself</a>.</p>

<p>What I experienced is nothing like Gruber describes. I saw my browser lock up and my CPU usage spike and stay spiked while the video played. I sent it to <a href="http://matthewwithanm.posterous.com/">Matthew</a> and he experienced the same performance issues.</p>

<p><a href="http://www.eightdotthree.net/wp-content/uploads/2010/02/html5cpu1.jpg"><img src="http://www.eightdotthree.net/wp-content/uploads/2010/02/html5cpu1.jpg" alt="" title="html5cpu" width="648" height="481" class="alignnone size-full wp-image-332" /></a></p>

<p>I look forward to better implementations and support from browsers. Better performance, real full screen, sharable implementations.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eightdotthree.net/2010/02/html-5s-real-deal-video-player/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Break a bitmap into a grid with ActionScript 3</title>
		<link>http://www.eightdotthree.net/2009/12/break-a-bitmap-into-a-grid-with-actionscript-3/</link>
		<comments>http://www.eightdotthree.net/2009/12/break-a-bitmap-into-a-grid-with-actionscript-3/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 18:50:30 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.eightdotthree.net/?p=304</guid>
		<description><![CDATA[I needed a way to break apart a loaded bitmap into a grid of smaller bitmaps so I could then manipulate them separately. I ended up creating BitmapGrid.as, a class that will break apart your bitmaps into an array for you to do with as you please. Download the code &#38; example files]]></description>
			<content:encoded><![CDATA[<p>I needed a way to break apart a loaded bitmap into a grid of smaller bitmaps so I could then manipulate them separately. I ended up creating BitmapGrid.as, a class that will break apart your bitmaps into an array for you to do with as you please.</p>

<p><br /></p>


    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="swfobj_0" width="500" height="395">
      <param name="movie" value="/flash/examples/breakBitmapIntoGridExample.swf" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="/flash/examples/breakBitmapIntoGridExample.swf" width="500" height="395">
      <!--<![endif]-->
        
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>


<p><a href="/code/actionscript3/BreakBitmap.zip">Download the code &amp; example files</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.eightdotthree.net/2009/12/break-a-bitmap-into-a-grid-with-actionscript-3/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>ReferenceError: Error #1065 re: E4X XML search</title>
		<link>http://www.eightdotthree.net/2009/10/referenceerror-error-1065-re-e4x-xml-search/</link>
		<comments>http://www.eightdotthree.net/2009/10/referenceerror-error-1065-re-e4x-xml-search/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 19:20:05 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[e4x]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.eightdotthree.net/?p=299</guid>
		<description><![CDATA[I was trying to do a simple E4X search of my XML for an attribute named &#8220;type&#8221; and I came across this error. ReferenceError: Error #1065: Variable @type is not defined. After ramming my head against a wall for around 30 minutes I asked Duncan if he ever saw such a thing. After all, other [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to do a simple E4X search of my XML for an attribute named &#8220;type&#8221; and I came across this error.</p>

<p><code>ReferenceError: Error #1065: Variable @type is not defined.</code></p>

<p>After ramming my head against a wall for around 30 minutes I asked <a href="http://www.hy-brid.com/">Duncan</a> if he ever saw such a thing. After all, other searches on the same XML were working perfectly. After some thought he remembered having a similar issue. Turns out that every node you are searching needs to have that attribute, in my case every node needed the &#8220;type&#8221; attribute.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eightdotthree.net/2009/10/referenceerror-error-1065-re-e4x-xml-search/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Subversion merge cheat sheet</title>
		<link>http://www.eightdotthree.net/2009/09/subversion-merge-cheat-sheet/</link>
		<comments>http://www.eightdotthree.net/2009/09/subversion-merge-cheat-sheet/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 14:22:49 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.eightdotthree.net/?p=240</guid>
		<description><![CDATA[At the office we are responsible for managing our source code in Subversion. Since no one here is all that familiar with Subversion I had to do some research and bug Matthew to find out how to merge back and forth from trunk to branch. This is a little cheat sheet that I added to [...]]]></description>
			<content:encoded><![CDATA[<p>At the office we are responsible for managing our source code in Subversion. Since no one here is all that familiar with Subversion I had to do some research and bug <a href="http://www.exanimo.com/">Matthew</a> to find out how to merge back and forth from trunk to branch.</p>

<p>This is a little cheat sheet that I added to our wiki as well.</p>

<h3>svn merge</h3>

<p>These are command line processes.</p>

<h4>Merge a branch back to the trunk</h4>

<ul>
<li>From the branch, <em>svn log &#8211;stop-on-copy</em>, this returns the revision number where the branch began (XXXX) </li>
<li>From trunk, <em>svn update</em> which will return the last revision number (YYYY) </li>
<li>From trunk, <em>svn merge -r XXXX:YYYY path/to/branch where</em> XXXX is the branch&#8217;s revision and YYYY is the latest revision </li>
<li>Last but not least <em>svn commit</em> the changes back into trunk with a nice message</li>
</ul>

<h4>Merge from trunk to a branch</h4>

<ul>
<li>From the branch, <em>svn log &#8211;stop-on-copy</em>, this returns the revision number where the branch began (XXXX) </li>
<li>From trunk, <em>svn update</em> which will return the last revision number (YYYY) </li>
<li>From the branch, <em>svn merge -r XXXX:YYYY path/to/trunk</em> where XXXX is the branch&#8217;s revision and YYYY is the latest revision </li>
<li><em>svn commit</em></li>
</ul>

<p>For both of these processes I have had more success going directory to directory, example merge the web directory and the src directory separately. Also be sure to svn update both the branch and the trunk to be sure you have the latest source code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eightdotthree.net/2009/09/subversion-merge-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1172: Definition fl.video:VideoEvent could not be found.</title>
		<link>http://www.eightdotthree.net/2008/05/1172-definition-flvideovideoevent-could-not-be-found/</link>
		<comments>http://www.eightdotthree.net/2008/05/1172-definition-flvideovideoevent-could-not-be-found/#comments</comments>
		<pubDate>Mon, 12 May 2008 19:51:44 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.eightdotthree.net/2008/05/1172-definition-flvideovideoevent-could-not-be-found/</guid>
		<description><![CDATA[I came across this error and am blogging about it so I won&#8217;t forget the solution and maybe it will help someone else. 1172: Definition fl.video:VideoEvent could not be found. In order to access a number of the &#8220;fl&#8221; packages you need to have a component in your library. In this case I added the [...]]]></description>
			<content:encoded><![CDATA[<p>I came across this error and am blogging about it so I won&#8217;t forget the solution and maybe it will help someone else.</p>

<blockquote>
1172: Definition fl.video:VideoEvent could not be found.
</blockquote>

<p>In order to access a number of the &#8220;fl&#8221; packages you need to have a component in your library. In this case I added the FLVPlayback component and all was well. Apparently you can use flash.utils.getDefinitionByName as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eightdotthree.net/2008/05/1172-definition-flvideovideoevent-could-not-be-found/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Adobe&#8217;s Video UI Components&#8230; sigh</title>
		<link>http://www.eightdotthree.net/2008/05/adobes-video-ui-components-sigh/</link>
		<comments>http://www.eightdotthree.net/2008/05/adobes-video-ui-components-sigh/#comments</comments>
		<pubDate>Fri, 09 May 2008 15:53:30 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.eightdotthree.net/2008/05/adobes-video-ui-components-sigh/</guid>
		<description><![CDATA[I am in the process of creating a common interface to control media players whether it be Adobe&#8217;s VideoPlayer or exanimo&#8217;s SoundPlayer. My initial desire was to have it accept Adobe&#8217;s own Video Components like PlayPauseButton and SeekBar as well as my own custom controls, but I have run into an issue. Adobe&#8217;s Video UI [...]]]></description>
			<content:encoded><![CDATA[<p>I am in the process of creating a common interface to control media players whether it be Adobe&#8217;s VideoPlayer or <a href="http://www.exanimo.com/">exanimo&#8217;s</a> SoundPlayer. My initial desire was to have it accept Adobe&#8217;s own Video Components like PlayPauseButton and SeekBar as well as my own custom controls, but I have run into an issue. Adobe&#8217;s Video UI Components do not work on their own but require UIControls.</p>

<p>So if I want a PlayPauseButton to work with SoundPlayer I need to roll my own. If I want a BufferingBar to work, I need to roll my own.</p>

<p>Hopefully in the next version of Flash they will resolve this and give us components that would accept an interface for a target.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eightdotthree.net/2008/05/adobes-video-ui-components-sigh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE7 Floats Not Clearing?</title>
		<link>http://www.eightdotthree.net/2008/03/ie7-floats-not-clearing/</link>
		<comments>http://www.eightdotthree.net/2008/03/ie7-floats-not-clearing/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 14:09:56 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[XHTML/CSS]]></category>

		<guid isPermaLink="false">http://www.eightdotthree.net/2008/03/ie7-floats-not-clearing/</guid>
		<description><![CDATA[I ran into an issue this weekend with IE7 not clearing my floats correctly. I had a wrapper with a background applied to it and then a content div with floated elements in it. The background was not repeating all the way down the page, and was ending before the content div. I was using [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into an issue this weekend with IE7 not clearing my floats correctly. I had a wrapper with a background applied to it and then a content div with floated elements in it. The background was not repeating all the way down the page, and was ending before the content div. I was using my normal methods of clearing floats and of course the page worked fine in Firefox and Safari on the Mac.</p>

<p>After some searching around looking for why this was happening I discovered an <a href="http://www.positioniseverything.net/easyclearing.html">article at Position Is Everything</a> that introduced me to a new clearing method which is far more elegant than the solution I was using previously.</p>

<p>You apply the .clearfix class to any div containing a float and its cleared!</p>

<p><code>
.clearfix:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}
.clearfix { display:inline-block; }
/* Hide from IE Mac &#42;/
.clearfix {display:block;}
/* End hide from IE Mac */
</code></p>

<p><a href="http://www.456bereastreet.com/archive/200603/new_clearing_method_needed_for_ie7/">Roger Johansson</a> also suggests adding the following code to a &lt;=IE6 specific CSS file in order to make sure it works in earlier browsers.</p>

<p><code>
clearfix {height:1px;}
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.eightdotthree.net/2008/03/ie7-floats-not-clearing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Favorite ActionScript 3 Events</title>
		<link>http://www.eightdotthree.net/2008/03/my-favorite-actionscript-3-events/</link>
		<comments>http://www.eightdotthree.net/2008/03/my-favorite-actionscript-3-events/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 20:06:45 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.eightdotthree.net/2008/03/my-favorite-actionscript-3-events/</guid>
		<description><![CDATA[So far my favorite events are Event.ADDED_TO_STAGE and Event.REMOVED_FROM_STAGE, they just makes things that much easier. For instance, I have a SimpleToolTip class that all you have to do is addChild and removeChild to manage it. When its added to the stage, I initialize everything that I need to turn on, when I remove it [...]]]></description>
			<content:encoded><![CDATA[<p>So far my favorite events are Event.ADDED_TO_STAGE and Event.REMOVED_FROM_STAGE, they just makes things that much easier.</p>

<p>For instance, I have a SimpleToolTip class that all you have to do is addChild and removeChild to manage it. When its added to the stage, I initialize everything that I need to turn on, when I remove it I turn everything back off.</p>

<p>Its just nice and clean.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eightdotthree.net/2008/03/my-favorite-actionscript-3-events/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

