

<?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>Michael Hartmayer</title>
	<atom:link href="http://www.michaelhartmayer.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michaelhartmayer.com</link>
	<description>Portfolio of an Idea Crafter</description>
	<lastBuildDate>Fri, 16 Sep 2011 19:52:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Canvas Tile System</title>
		<link>http://www.michaelhartmayer.com/javascript/canvas-tile-system/</link>
		<comments>http://www.michaelhartmayer.com/javascript/canvas-tile-system/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 05:38:42 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=635</guid>
		<description><![CDATA[Here&#8217;s something quick that I put together to see how easily I could create a Tile System (as in 2d sprite map for games) using JavaScript and Canvas. First I set out to create a system for loading, caching, and retrieving the tiles. Here&#8217;s what I came up with: // Allows you to load image [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s something quick that I put together to see how easily I could create a Tile System (as in 2d sprite map for games) using JavaScript and Canvas.</p>
<p>First I set out to create a system for loading, caching, and retrieving the tiles. Here&#8217;s what I came up with:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Allows you to load image sprite and then make cached tiles</span>
<span style="color: #006600; font-style: italic;">// that can be retrieved</span>
<span style="color: #003366; font-weight: bold;">var</span> TileLibrary <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>img<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #003366; font-weight: bold;">var</span> oTileLibrary <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
      elCanvas <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'canvas'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
      cxCanvas <span style="color: #339933;">=</span> elCanvas.<span style="color: #660066;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'2d'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  elCanvas.<span style="color: #660066;">width</span>  <span style="color: #339933;">=</span> img.<span style="color: #660066;">width</span><span style="color: #339933;">;</span>
  elCanvas.<span style="color: #660066;">height</span> <span style="color: #339933;">=</span> img.<span style="color: #660066;">height</span><span style="color: #339933;">;</span>
  cxCanvas.<span style="color: #660066;">drawImage</span><span style="color: #009900;">&#40;</span>img<span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> img.<span style="color: #660066;">width</span><span style="color: #339933;">,</span> img.<span style="color: #660066;">height</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#123;</span>
    makeType<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span><span style="color: #339933;">,</span> x<span style="color: #339933;">,</span> y<span style="color: #339933;">,</span> width<span style="color: #339933;">,</span> height<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      oTileLibrary<span style="color: #009900;">&#91;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> cxCanvas.<span style="color: #660066;">getImageData</span><span style="color: #009900;">&#40;</span>x<span style="color: #339933;">,</span> y<span style="color: #339933;">,</span> width<span style="color: #339933;">,</span> height<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    getTileData<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000066; font-weight: bold;">return</span> oTileLibrary<span style="color: #009900;">&#91;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>&nbsp;</p>
<p>This allows me to take an <em>Image</em> object and turn pieces of it into data that canvas can understand. Usage would look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// img is a preloaded image object</span>
<span style="color: #003366; font-weight: bold;">var</span> oTileLibrary <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> TileLibrary<span style="color: #009900;">&#40;</span>img<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// cuts out a chunk of the image at (0, 0) with dimensions 64x64 and caches it</span>
oTileLibrary.<span style="color: #660066;">makeType</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;FloorTile&quot;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">64</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">64</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// gets the ImageData out of cache and ready to be dumped into a canvas</span>
<span style="color: #003366; font-weight: bold;">var</span> tFloorTile <span style="color: #339933;">=</span> oTileLibrary.<span style="color: #660066;">getTileData</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;FloorTile&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// inserts that floor tile into its final destination</span>
myCanvas.<span style="color: #660066;">putImageData</span><span style="color: #009900;">&#40;</span>tFloorTile<span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>&nbsp;</p>
<p>I ended up borrowing this image for my prototype:<br />
<img src="http://playground.michaelhartmayer.com/f/prototypes/canvas-tile-system/tiles/desert.jpg" alt="Desert Sprite Map" /></p>
<p>( http://www.lostgarden.com/2006/02/250-free-handdrawn-textures.html )</p>
<p>&nbsp;</p>
<p>I cut out the <strong>third</strong> tile and the <strong>fourth</strong> tile, and arranged them in a 3&#215;3 grid, with the middle tile being the little circle looking thing.</p>
<p>Check out the sample here: <a title="Tile System Prototype" href="http://playground.michaelhartmayer.com/f/prototypes/canvas-tile-system/" target="_blank">Tile System Prototype</a></p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-tile-system%2F&amp;title=Canvas%20Tile%20System&amp;bodytext=Here%27s%20something%20quick%20that%20I%20put%20together%20to%20see%20how%20easily%20I%20could%20create%20a%20Tile%20System%20%28as%20in%202d%20sprite%20map%20for%20games%29%20using%20JavaScript%20and%20Canvas.%0D%0A%0D%0AFirst%20I%20set%20out%20to%20create%20a%20system%20for%20loading%2C%20caching%2C%20and%20retrieving%20the%20tiles.%20Here%27s%20what%20I" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-tile-system%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-tile-system%2F&amp;title=Canvas%20Tile%20System&amp;notes=Here%27s%20something%20quick%20that%20I%20put%20together%20to%20see%20how%20easily%20I%20could%20create%20a%20Tile%20System%20%28as%20in%202d%20sprite%20map%20for%20games%29%20using%20JavaScript%20and%20Canvas.%0D%0A%0D%0AFirst%20I%20set%20out%20to%20create%20a%20system%20for%20loading%2C%20caching%2C%20and%20retrieving%20the%20tiles.%20Here%27s%20what%20I" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-tile-system%2F&amp;t=Canvas%20Tile%20System" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-tile-system%2F&amp;title=Canvas%20Tile%20System" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-tile-system%2F&amp;title=Canvas%20Tile%20System&amp;annotation=Here%27s%20something%20quick%20that%20I%20put%20together%20to%20see%20how%20easily%20I%20could%20create%20a%20Tile%20System%20%28as%20in%202d%20sprite%20map%20for%20games%29%20using%20JavaScript%20and%20Canvas.%0D%0A%0D%0AFirst%20I%20set%20out%20to%20create%20a%20system%20for%20loading%2C%20caching%2C%20and%20retrieving%20the%20tiles.%20Here%27s%20what%20I" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-tile-system%2F&amp;title=Canvas%20Tile%20System&amp;source=Michael+Hartmayer+Portfolio+of+an+Idea+Crafter&amp;summary=Here%27s%20something%20quick%20that%20I%20put%20together%20to%20see%20how%20easily%20I%20could%20create%20a%20Tile%20System%20%28as%20in%202d%20sprite%20map%20for%20games%29%20using%20JavaScript%20and%20Canvas.%0D%0A%0D%0AFirst%20I%20set%20out%20to%20create%20a%20system%20for%20loading%2C%20caching%2C%20and%20retrieving%20the%20tiles.%20Here%27s%20what%20I" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-tile-system%2F&amp;title=Canvas%20Tile%20System" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-tile-system%2F&amp;t=Canvas%20Tile%20System" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-tile-system%2F&amp;title=Canvas%20Tile%20System" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-tile-system%2F&amp;title=Canvas%20Tile%20System" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/javascript/canvas-tile-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Canvas Pixel Manipulation a&#8217; la Quick and Dirty</title>
		<link>http://www.michaelhartmayer.com/javascript/canvas-pixel-manipulation-a-la-quick-and-dirty/</link>
		<comments>http://www.michaelhartmayer.com/javascript/canvas-pixel-manipulation-a-la-quick-and-dirty/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 16:50:17 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=632</guid>
		<description><![CDATA[In a recent prototype I attempted to load in a PNG onto a canvas, change the image to a silhouette, as well as create a desaturated version, cache all three (including the initial state) sets of pixel data, and swap them out interchangeably. Then I wanted to spit the data back out into something I [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent prototype I attempted to load in a PNG onto a canvas, change the image to a silhouette, as well as create a desaturated version, cache all three (including the initial state) sets of pixel data, and swap them out interchangeably. Then I wanted to spit the data back out into something I could incorporate into the DOM.</p>
<p>Here&#8217;s what I came up with: <a title="Canvas Pixel Manipulation" href="http://playground.michaelhartmayer.com/f/wip11/ios/proto/canvas/" target="_blank">Canvas Pixel Manipulation</a></p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-pixel-manipulation-a-la-quick-and-dirty%2F&amp;title=Canvas%20Pixel%20Manipulation%20a%27%20la%20Quick%20and%20Dirty&amp;bodytext=In%20a%20recent%20prototype%20I%20attempted%20to%20load%20in%20a%20PNG%20onto%20a%20canvas%2C%20change%20the%20image%20to%20a%20silhouette%2C%20as%20well%20as%20create%20a%20desaturated%20version%2C%20cache%20all%20three%20%28including%20the%20initial%20state%29%20sets%20of%20pixel%20data%2C%20and%20swap%20them%20out%20interchangeably.%20Then%20I%20w" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-pixel-manipulation-a-la-quick-and-dirty%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-pixel-manipulation-a-la-quick-and-dirty%2F&amp;title=Canvas%20Pixel%20Manipulation%20a%27%20la%20Quick%20and%20Dirty&amp;notes=In%20a%20recent%20prototype%20I%20attempted%20to%20load%20in%20a%20PNG%20onto%20a%20canvas%2C%20change%20the%20image%20to%20a%20silhouette%2C%20as%20well%20as%20create%20a%20desaturated%20version%2C%20cache%20all%20three%20%28including%20the%20initial%20state%29%20sets%20of%20pixel%20data%2C%20and%20swap%20them%20out%20interchangeably.%20Then%20I%20w" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-pixel-manipulation-a-la-quick-and-dirty%2F&amp;t=Canvas%20Pixel%20Manipulation%20a%27%20la%20Quick%20and%20Dirty" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-pixel-manipulation-a-la-quick-and-dirty%2F&amp;title=Canvas%20Pixel%20Manipulation%20a%27%20la%20Quick%20and%20Dirty" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-pixel-manipulation-a-la-quick-and-dirty%2F&amp;title=Canvas%20Pixel%20Manipulation%20a%27%20la%20Quick%20and%20Dirty&amp;annotation=In%20a%20recent%20prototype%20I%20attempted%20to%20load%20in%20a%20PNG%20onto%20a%20canvas%2C%20change%20the%20image%20to%20a%20silhouette%2C%20as%20well%20as%20create%20a%20desaturated%20version%2C%20cache%20all%20three%20%28including%20the%20initial%20state%29%20sets%20of%20pixel%20data%2C%20and%20swap%20them%20out%20interchangeably.%20Then%20I%20w" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-pixel-manipulation-a-la-quick-and-dirty%2F&amp;title=Canvas%20Pixel%20Manipulation%20a%27%20la%20Quick%20and%20Dirty&amp;source=Michael+Hartmayer+Portfolio+of+an+Idea+Crafter&amp;summary=In%20a%20recent%20prototype%20I%20attempted%20to%20load%20in%20a%20PNG%20onto%20a%20canvas%2C%20change%20the%20image%20to%20a%20silhouette%2C%20as%20well%20as%20create%20a%20desaturated%20version%2C%20cache%20all%20three%20%28including%20the%20initial%20state%29%20sets%20of%20pixel%20data%2C%20and%20swap%20them%20out%20interchangeably.%20Then%20I%20w" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-pixel-manipulation-a-la-quick-and-dirty%2F&amp;title=Canvas%20Pixel%20Manipulation%20a%27%20la%20Quick%20and%20Dirty" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-pixel-manipulation-a-la-quick-and-dirty%2F&amp;t=Canvas%20Pixel%20Manipulation%20a%27%20la%20Quick%20and%20Dirty" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-pixel-manipulation-a-la-quick-and-dirty%2F&amp;title=Canvas%20Pixel%20Manipulation%20a%27%20la%20Quick%20and%20Dirty" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fcanvas-pixel-manipulation-a-la-quick-and-dirty%2F&amp;title=Canvas%20Pixel%20Manipulation%20a%27%20la%20Quick%20and%20Dirty" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/javascript/canvas-pixel-manipulation-a-la-quick-and-dirty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Singleton Database Class</title>
		<link>http://www.michaelhartmayer.com/php/php-singleton-database-class/</link>
		<comments>http://www.michaelhartmayer.com/php/php-singleton-database-class/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 21:36:36 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=623</guid>
		<description><![CDATA[Here&#8217;s a newer iteration of the PHP Database class I tend to prototype with. This one is cleaner than its predecessor. Usage: # Config $aSettings = array&#40; 'username' =&#62; 'foo', 'password' =&#62; 'xxxxxx', 'host' =&#62; 'localhost', 'db' =&#62; 'my_database' &#41;; &#160; # Get Instance, Settings, and Connect $Db = Db::getInstance&#40;&#41;; $Db-&#62;Settings&#40;$aSettings&#41;; $Db-&#62;Connect&#40;&#41;; &#160; # Set [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a newer iteration of the PHP Database class I tend to prototype with. This one is cleaner than its predecessor.</p>
<p>Usage:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Config
</span><span style="color: #000088;">$aSettings</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
  <span style="color: #0000ff;">'username'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'foo'</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'password'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'xxxxxx'</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'host'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'db'</span>        <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'my_database'</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Get Instance, Settings, and Connect
</span><span style="color: #000088;">$Db</span> <span style="color: #339933;">=</span> Db<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$Db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Settings</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$aSettings</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$Db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Connect</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Set Query
</span><span style="color: #000088;">$sQuery</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;INSERT INTO `table` VALUES (`foo`,`bar`) VALUES ('value', 'value')&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$Db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Set</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sQuery</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Get Query
</span><span style="color: #000088;">$sQuery</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM table&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$aResults</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$Db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Get</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sQuery</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Returns an Array of Rows</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$aResults</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'foo'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// First row of &quot;foo&quot; Column</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Count
</span><span style="color: #000088;">$iCounted</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$Db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Count</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'table'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;WHERE `bla`='blue'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Returns a Number</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Sanitize String
</span><span style="color: #000088;">$sString</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;This isn't unusual&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$sCleanString</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$Db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Clean</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sString</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And the Class:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #000000; font-weight: bold;">class</span> Db <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$ref</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$settings</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$is_connected</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$errors</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> static <span style="color: #000088;">$singleton</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_connected</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">function</span> getInstance <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$singleton</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$singleton</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$singleton</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Settings <span style="color: #009900;">&#40;</span><span style="color: #000088;">$aSettings</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">settings</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$aSettings</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Connect <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_connected</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Disconnect</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">settings</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'host'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">settings</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'username'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">settings</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
        <span style="color: #009900; font-weight: bold;">true</span>
      <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #990000;">array_push</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errors</span><span style="color: #339933;">,</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #000088;">$bSelectDatabase</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">settings</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'db'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span>
      <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$bSelectDatabase</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #990000;">array_push</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errors</span><span style="color: #339933;">,</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_connected</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Disconnect <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_connected</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Clean <span style="color: #009900;">&#40;</span><span style="color: #000088;">$sString</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_connected</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sString</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Set <span style="color: #009900;">&#40;</span><span style="color: #000088;">$sQuery</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$bSet</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sQuery</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$bSet</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #990000;">array_push</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errors</span><span style="color: #339933;">,</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Get <span style="color: #009900;">&#40;</span><span style="color: #000088;">$sQuery</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$sqlResults</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sQuery</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ref</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$sqlResults</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #990000;">array_push</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errors</span><span style="color: #339933;">,</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #000088;">$aResults</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$aRow</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sqlResults</span><span style="color: #339933;">,</span> MYSQL_ASSOC<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$aResults</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$aRow</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #b1b100;">return</span> <span style="color: #000088;">$aResults</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #990000;">Count</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$sTable</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sCondition</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$sQuery</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT COUNT(*) AS 'COUNT' FROM `<span style="color: #006699; font-weight: bold;">$sTable</span>` <span style="color: #006699; font-weight: bold;">$sCondition</span>&quot;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$aResults</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Get</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sQuery</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">return</span> <span style="color: #000088;">$aResults</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'COUNT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Errors<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errors</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-singleton-database-class%2F&amp;title=PHP%20Singleton%20Database%20Class&amp;bodytext=Here%27s%20a%20newer%20iteration%20of%20the%20PHP%20Database%20class%20I%20tend%20to%20prototype%20with.%20This%20one%20is%20cleaner%20than%20its%20predecessor.%0D%0A%0D%0AUsage%3A%0D%0A%0D%0A%23%20Config%0D%0A%24aSettings%20%3D%20array%28%0D%0A%20%20%27username%27%20%20%3D%3E%20%27foo%27%2C%0D%0A%20%20%27password%27%20%20%3D%3E%20%27xxxxxx%27%2C%0D%0A%20%20%27host%27%20%20%20%20%20%20%3D%3E%20%27localhost%27%2C%0D%0A%20%20%27" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-singleton-database-class%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-singleton-database-class%2F&amp;title=PHP%20Singleton%20Database%20Class&amp;notes=Here%27s%20a%20newer%20iteration%20of%20the%20PHP%20Database%20class%20I%20tend%20to%20prototype%20with.%20This%20one%20is%20cleaner%20than%20its%20predecessor.%0D%0A%0D%0AUsage%3A%0D%0A%0D%0A%23%20Config%0D%0A%24aSettings%20%3D%20array%28%0D%0A%20%20%27username%27%20%20%3D%3E%20%27foo%27%2C%0D%0A%20%20%27password%27%20%20%3D%3E%20%27xxxxxx%27%2C%0D%0A%20%20%27host%27%20%20%20%20%20%20%3D%3E%20%27localhost%27%2C%0D%0A%20%20%27" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-singleton-database-class%2F&amp;t=PHP%20Singleton%20Database%20Class" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-singleton-database-class%2F&amp;title=PHP%20Singleton%20Database%20Class" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-singleton-database-class%2F&amp;title=PHP%20Singleton%20Database%20Class&amp;annotation=Here%27s%20a%20newer%20iteration%20of%20the%20PHP%20Database%20class%20I%20tend%20to%20prototype%20with.%20This%20one%20is%20cleaner%20than%20its%20predecessor.%0D%0A%0D%0AUsage%3A%0D%0A%0D%0A%23%20Config%0D%0A%24aSettings%20%3D%20array%28%0D%0A%20%20%27username%27%20%20%3D%3E%20%27foo%27%2C%0D%0A%20%20%27password%27%20%20%3D%3E%20%27xxxxxx%27%2C%0D%0A%20%20%27host%27%20%20%20%20%20%20%3D%3E%20%27localhost%27%2C%0D%0A%20%20%27" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-singleton-database-class%2F&amp;title=PHP%20Singleton%20Database%20Class&amp;source=Michael+Hartmayer+Portfolio+of+an+Idea+Crafter&amp;summary=Here%27s%20a%20newer%20iteration%20of%20the%20PHP%20Database%20class%20I%20tend%20to%20prototype%20with.%20This%20one%20is%20cleaner%20than%20its%20predecessor.%0D%0A%0D%0AUsage%3A%0D%0A%0D%0A%23%20Config%0D%0A%24aSettings%20%3D%20array%28%0D%0A%20%20%27username%27%20%20%3D%3E%20%27foo%27%2C%0D%0A%20%20%27password%27%20%20%3D%3E%20%27xxxxxx%27%2C%0D%0A%20%20%27host%27%20%20%20%20%20%20%3D%3E%20%27localhost%27%2C%0D%0A%20%20%27" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-singleton-database-class%2F&amp;title=PHP%20Singleton%20Database%20Class" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-singleton-database-class%2F&amp;t=PHP%20Singleton%20Database%20Class" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-singleton-database-class%2F&amp;title=PHP%20Singleton%20Database%20Class" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fphp%2Fphp-singleton-database-class%2F&amp;title=PHP%20Singleton%20Database%20Class" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/php/php-singleton-database-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Timer Countdown</title>
		<link>http://www.michaelhartmayer.com/javascript/javascript-timer-countdown/</link>
		<comments>http://www.michaelhartmayer.com/javascript/javascript-timer-countdown/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 16:51:26 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[countdown]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=601</guid>
		<description><![CDATA[Working on a new game. Wrote this TimerCountdown object for a Timer in the game. Works pretty well, still not fully tested. var TimerCountdown = function&#40;&#41; &#123; var oOnZero = function&#40;&#41;&#123;&#125;, oOnUpdate = function&#40;&#41;&#123;&#125;, oTimer, iCurTime = 0; &#160; function CreateTimer&#40;&#41; &#123; oTimer = setInterval&#40;IterateTimer, 1000&#41; &#125; &#160; function DestroyTimer&#40;&#41; &#123; clearInterval&#40; oTimer &#41;; &#125; [...]]]></description>
			<content:encoded><![CDATA[<p>Working on a new game. Wrote this TimerCountdown object for a Timer in the game. Works pretty well, still not fully tested.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> TimerCountdown <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #003366; font-weight: bold;">var</span> oOnZero     <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
      oOnUpdate   <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
      oTimer<span style="color: #339933;">,</span>
      iCurTime    <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #003366; font-weight: bold;">function</span> CreateTimer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    oTimer <span style="color: #339933;">=</span> setInterval<span style="color: #009900;">&#40;</span>IterateTimer<span style="color: #339933;">,</span> <span style="color: #CC0000;">1000</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #003366; font-weight: bold;">function</span> DestroyTimer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    clearInterval<span style="color: #009900;">&#40;</span> oTimer <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #003366; font-weight: bold;">function</span> IterateTimer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    iCurTime <span style="color: #339933;">=</span> iCurTime <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
    oOnUpdate<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
      Seconds<span style="color: #339933;">:</span> iCurTime<span style="color: #339933;">,</span>
      Minutes<span style="color: #339933;">:</span> parseInt<span style="color: #009900;">&#40;</span> iCurTime <span style="color: #339933;">/</span> <span style="color: #CC0000;">60</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
      Hours<span style="color: #339933;">:</span> parseInt<span style="color: #009900;">&#40;</span> iCurTime <span style="color: #009966; font-style: italic;">/ 60 /</span> <span style="color: #CC0000;">60</span> <span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> iCurTime <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      DestroyTimer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      oOnZero<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#123;</span>
    SetTime<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> iSeconds <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      iCurTime <span style="color: #339933;">=</span> iSeconds<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    Start<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      CreateTimer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    <span style="color: #000066;">Stop</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      DestroyTimer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    Time<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000066; font-weight: bold;">return</span> iCurTime<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    Add<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> iSeconds <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      iCurTime <span style="color: #339933;">=</span> iCurTime <span style="color: #339933;">+</span> iSeconds<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    Subtract<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> iSeconds <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      iCurTime <span style="color: #339933;">=</span> iCurTime <span style="color: #339933;">-</span> iSeconds<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    OnUpdate<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> cbFunction <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      oOnUpdate <span style="color: #339933;">=</span> cbFunction<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    OnZero<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> cbFunction <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      oOnZero <span style="color: #339933;">=</span> cbFunction<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>




Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-timer-countdown%2F&amp;title=JavaScript%20Timer%20Countdown&amp;bodytext=Working%20on%20a%20new%20game.%20Wrote%20this%20TimerCountdown%20object%20for%20a%20Timer%20in%20the%20game.%20Works%20pretty%20well%2C%20still%20not%20fully%20tested.%0D%0A%0D%0A%0D%0Avar%20TimerCountdown%20%3D%20function%28%29%20%7B%0D%0A%20%20var%20oOnZero%20%20%20%20%20%3D%20function%28%29%7B%7D%2C%0D%0A%20%20%20%20%20%20oOnUpdate%20%20%20%3D%20function%28%29%7B%7D%2C%0D%0A%20%20%20%20%20%20oTimer%2C%0D%0A%20" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-timer-countdown%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-timer-countdown%2F&amp;title=JavaScript%20Timer%20Countdown&amp;notes=Working%20on%20a%20new%20game.%20Wrote%20this%20TimerCountdown%20object%20for%20a%20Timer%20in%20the%20game.%20Works%20pretty%20well%2C%20still%20not%20fully%20tested.%0D%0A%0D%0A%0D%0Avar%20TimerCountdown%20%3D%20function%28%29%20%7B%0D%0A%20%20var%20oOnZero%20%20%20%20%20%3D%20function%28%29%7B%7D%2C%0D%0A%20%20%20%20%20%20oOnUpdate%20%20%20%3D%20function%28%29%7B%7D%2C%0D%0A%20%20%20%20%20%20oTimer%2C%0D%0A%20" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-timer-countdown%2F&amp;t=JavaScript%20Timer%20Countdown" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-timer-countdown%2F&amp;title=JavaScript%20Timer%20Countdown" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-timer-countdown%2F&amp;title=JavaScript%20Timer%20Countdown&amp;annotation=Working%20on%20a%20new%20game.%20Wrote%20this%20TimerCountdown%20object%20for%20a%20Timer%20in%20the%20game.%20Works%20pretty%20well%2C%20still%20not%20fully%20tested.%0D%0A%0D%0A%0D%0Avar%20TimerCountdown%20%3D%20function%28%29%20%7B%0D%0A%20%20var%20oOnZero%20%20%20%20%20%3D%20function%28%29%7B%7D%2C%0D%0A%20%20%20%20%20%20oOnUpdate%20%20%20%3D%20function%28%29%7B%7D%2C%0D%0A%20%20%20%20%20%20oTimer%2C%0D%0A%20" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-timer-countdown%2F&amp;title=JavaScript%20Timer%20Countdown&amp;source=Michael+Hartmayer+Portfolio+of+an+Idea+Crafter&amp;summary=Working%20on%20a%20new%20game.%20Wrote%20this%20TimerCountdown%20object%20for%20a%20Timer%20in%20the%20game.%20Works%20pretty%20well%2C%20still%20not%20fully%20tested.%0D%0A%0D%0A%0D%0Avar%20TimerCountdown%20%3D%20function%28%29%20%7B%0D%0A%20%20var%20oOnZero%20%20%20%20%20%3D%20function%28%29%7B%7D%2C%0D%0A%20%20%20%20%20%20oOnUpdate%20%20%20%3D%20function%28%29%7B%7D%2C%0D%0A%20%20%20%20%20%20oTimer%2C%0D%0A%20" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-timer-countdown%2F&amp;title=JavaScript%20Timer%20Countdown" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-timer-countdown%2F&amp;t=JavaScript%20Timer%20Countdown" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-timer-countdown%2F&amp;title=JavaScript%20Timer%20Countdown" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-timer-countdown%2F&amp;title=JavaScript%20Timer%20Countdown" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/javascript/javascript-timer-countdown/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ventrilo App for iPhone &#8211; VentBL</title>
		<link>http://www.michaelhartmayer.com/apps/ventrilo-app-for-iphone-ventbl/</link>
		<comments>http://www.michaelhartmayer.com/apps/ventrilo-app-for-iphone-ventbl/#comments</comments>
		<pubDate>Sat, 28 May 2011 15:14:13 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[Apps]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=596</guid>
		<description><![CDATA[I just released VentBL ( Ventrilo Buddy List ) for the iPhone. Ventrilo Buddy List allows you to easily monitor who&#8217;s online your favorite Ventrilo server, from your iPhone, iPad, and iPod Touch. Check it out: iTunes &#8211; VentBL Share and Enjoy:]]></description>
			<content:encoded><![CDATA[<p>I just released VentBL ( Ventrilo Buddy List ) for the iPhone. Ventrilo Buddy List allows you to easily monitor who&#8217;s online your favorite Ventrilo server, from your iPhone, iPad, and iPod Touch. </p>
<p>Check it out:  <a href="http://itunes.apple.com/us/app/ventbl/id439563861?mt=8&#038;ls=1" title="Ventrilo Buddy List for iPhone">iTunes &#8211; VentBL</a></p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fapps%2Fventrilo-app-for-iphone-ventbl%2F&amp;title=Ventrilo%20App%20for%20iPhone%20-%20VentBL&amp;bodytext=I%20just%20released%20VentBL%20%28%20Ventrilo%20Buddy%20List%20%29%20for%20the%20iPhone.%20Ventrilo%20Buddy%20List%20allows%20you%20to%20easily%20monitor%20who%27s%20online%20your%20favorite%20Ventrilo%20server%2C%20from%20your%20iPhone%2C%20iPad%2C%20and%20iPod%20Touch.%20%0D%0A%0D%0ACheck%20it%20out%3A%20%20iTunes%20-%20VentBL" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fapps%2Fventrilo-app-for-iphone-ventbl%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fapps%2Fventrilo-app-for-iphone-ventbl%2F&amp;title=Ventrilo%20App%20for%20iPhone%20-%20VentBL&amp;notes=I%20just%20released%20VentBL%20%28%20Ventrilo%20Buddy%20List%20%29%20for%20the%20iPhone.%20Ventrilo%20Buddy%20List%20allows%20you%20to%20easily%20monitor%20who%27s%20online%20your%20favorite%20Ventrilo%20server%2C%20from%20your%20iPhone%2C%20iPad%2C%20and%20iPod%20Touch.%20%0D%0A%0D%0ACheck%20it%20out%3A%20%20iTunes%20-%20VentBL" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fapps%2Fventrilo-app-for-iphone-ventbl%2F&amp;t=Ventrilo%20App%20for%20iPhone%20-%20VentBL" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fapps%2Fventrilo-app-for-iphone-ventbl%2F&amp;title=Ventrilo%20App%20for%20iPhone%20-%20VentBL" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fapps%2Fventrilo-app-for-iphone-ventbl%2F&amp;title=Ventrilo%20App%20for%20iPhone%20-%20VentBL&amp;annotation=I%20just%20released%20VentBL%20%28%20Ventrilo%20Buddy%20List%20%29%20for%20the%20iPhone.%20Ventrilo%20Buddy%20List%20allows%20you%20to%20easily%20monitor%20who%27s%20online%20your%20favorite%20Ventrilo%20server%2C%20from%20your%20iPhone%2C%20iPad%2C%20and%20iPod%20Touch.%20%0D%0A%0D%0ACheck%20it%20out%3A%20%20iTunes%20-%20VentBL" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fapps%2Fventrilo-app-for-iphone-ventbl%2F&amp;title=Ventrilo%20App%20for%20iPhone%20-%20VentBL&amp;source=Michael+Hartmayer+Portfolio+of+an+Idea+Crafter&amp;summary=I%20just%20released%20VentBL%20%28%20Ventrilo%20Buddy%20List%20%29%20for%20the%20iPhone.%20Ventrilo%20Buddy%20List%20allows%20you%20to%20easily%20monitor%20who%27s%20online%20your%20favorite%20Ventrilo%20server%2C%20from%20your%20iPhone%2C%20iPad%2C%20and%20iPod%20Touch.%20%0D%0A%0D%0ACheck%20it%20out%3A%20%20iTunes%20-%20VentBL" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fapps%2Fventrilo-app-for-iphone-ventbl%2F&amp;title=Ventrilo%20App%20for%20iPhone%20-%20VentBL" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fapps%2Fventrilo-app-for-iphone-ventbl%2F&amp;t=Ventrilo%20App%20for%20iPhone%20-%20VentBL" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fapps%2Fventrilo-app-for-iphone-ventbl%2F&amp;title=Ventrilo%20App%20for%20iPhone%20-%20VentBL" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fapps%2Fventrilo-app-for-iphone-ventbl%2F&amp;title=Ventrilo%20App%20for%20iPhone%20-%20VentBL" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/apps/ventrilo-app-for-iphone-ventbl/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>JavaScript Replace All</title>
		<link>http://www.michaelhartmayer.com/javascript/javascript-replace-all/</link>
		<comments>http://www.michaelhartmayer.com/javascript/javascript-replace-all/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 21:47:15 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=585</guid>
		<description><![CDATA[Here&#8217;s my version of the replaceAll() method for JavaScript. I doubt it&#8217;s faster than RegEx, but it was certainly fun to make. String.prototype.replaceAll = function&#40;s, r, n&#41; &#123; if&#40; this.toString&#40;&#41;.indexOf&#40;s&#41; &#60; n &#41; n = 0; if&#40; !n &#41; return this.toString&#40;&#41;.split&#40; s &#41;.join&#40; r &#41;; &#160; var j = this.toString&#40;&#41;; while&#40; n-- &#41; &#123; j [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s my version of the replaceAll() method for JavaScript. I doubt it&#8217;s faster than RegEx, but it was certainly fun to make. <img src='http://www.michaelhartmayer.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">String.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">replaceAll</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>s<span style="color: #339933;">,</span> r<span style="color: #339933;">,</span> n<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span>s<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> n <span style="color: #009900;">&#41;</span> n <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>n <span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span> s <span style="color: #009900;">&#41;</span>.<span style="color: #660066;">join</span><span style="color: #009900;">&#40;</span> r <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> j <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span> n<span style="color: #339933;">--</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		j <span style="color: #339933;">=</span> j.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span> s<span style="color: #339933;">,</span> r <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">return</span> j<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> TestString <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;I Love My Pie So Much, Don't You?&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Usage</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span> TestString.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;o&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;*&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span> TestString.<span style="color: #660066;">replaceAll</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;o&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;*&quot;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-replace-all%2F&amp;title=JavaScript%20Replace%20All&amp;bodytext=Here%27s%20my%20version%20of%20the%20replaceAll%28%29%20method%20for%20JavaScript.%20I%20doubt%20it%27s%20faster%20than%20RegEx%2C%20but%20it%20was%20certainly%20fun%20to%20make.%20%3A%29%0D%0A%0D%0A%0D%0AString.prototype.replaceAll%20%3D%20function%28s%2C%20r%2C%20n%29%20%7B%0D%0A%09if%28%20this.toString%28%29.indexOf%28s%29%20%3C%20n%20%29%20n%20%3D%200%3B%0D%0A%09if%28%20%21n%20%29%20return%20t" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-replace-all%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-replace-all%2F&amp;title=JavaScript%20Replace%20All&amp;notes=Here%27s%20my%20version%20of%20the%20replaceAll%28%29%20method%20for%20JavaScript.%20I%20doubt%20it%27s%20faster%20than%20RegEx%2C%20but%20it%20was%20certainly%20fun%20to%20make.%20%3A%29%0D%0A%0D%0A%0D%0AString.prototype.replaceAll%20%3D%20function%28s%2C%20r%2C%20n%29%20%7B%0D%0A%09if%28%20this.toString%28%29.indexOf%28s%29%20%3C%20n%20%29%20n%20%3D%200%3B%0D%0A%09if%28%20%21n%20%29%20return%20t" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-replace-all%2F&amp;t=JavaScript%20Replace%20All" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-replace-all%2F&amp;title=JavaScript%20Replace%20All" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-replace-all%2F&amp;title=JavaScript%20Replace%20All&amp;annotation=Here%27s%20my%20version%20of%20the%20replaceAll%28%29%20method%20for%20JavaScript.%20I%20doubt%20it%27s%20faster%20than%20RegEx%2C%20but%20it%20was%20certainly%20fun%20to%20make.%20%3A%29%0D%0A%0D%0A%0D%0AString.prototype.replaceAll%20%3D%20function%28s%2C%20r%2C%20n%29%20%7B%0D%0A%09if%28%20this.toString%28%29.indexOf%28s%29%20%3C%20n%20%29%20n%20%3D%200%3B%0D%0A%09if%28%20%21n%20%29%20return%20t" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-replace-all%2F&amp;title=JavaScript%20Replace%20All&amp;source=Michael+Hartmayer+Portfolio+of+an+Idea+Crafter&amp;summary=Here%27s%20my%20version%20of%20the%20replaceAll%28%29%20method%20for%20JavaScript.%20I%20doubt%20it%27s%20faster%20than%20RegEx%2C%20but%20it%20was%20certainly%20fun%20to%20make.%20%3A%29%0D%0A%0D%0A%0D%0AString.prototype.replaceAll%20%3D%20function%28s%2C%20r%2C%20n%29%20%7B%0D%0A%09if%28%20this.toString%28%29.indexOf%28s%29%20%3C%20n%20%29%20n%20%3D%200%3B%0D%0A%09if%28%20%21n%20%29%20return%20t" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-replace-all%2F&amp;title=JavaScript%20Replace%20All" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-replace-all%2F&amp;t=JavaScript%20Replace%20All" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-replace-all%2F&amp;title=JavaScript%20Replace%20All" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Fjavascript-replace-all%2F&amp;title=JavaScript%20Replace%20All" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/javascript/javascript-replace-all/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logo Ideas</title>
		<link>http://www.michaelhartmayer.com/notice/logo-ideas/</link>
		<comments>http://www.michaelhartmayer.com/notice/logo-ideas/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 15:59:55 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[Notice]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=580</guid>
		<description><![CDATA[Playing around with Illustrator again. Trying to come up with some branding for me. Working with the letters &#8220;m&#8221; and &#8220;h&#8221; (psst, they&#8217;re my initials). Here&#8217;s one of my drafts: Share and Enjoy:]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;">Playing around with Illustrator again. Trying to come up with some branding for me. Working with the letters &#8220;m&#8221; and &#8220;h&#8221; (psst, they&#8217;re my initials). Here&#8217;s one of my drafts:<br />
<a href="http://www.michaelhartmayer.com/wp-content/uploads/2011/03/logo-a.jpg" rel="lightbox"><img class="size-full wp-image-581 aligncenter" title="Mh Logo" src="http://www.michaelhartmayer.com/wp-content/uploads/2011/03/logo-a.jpg" alt="" width="368" height="392" /></a></p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Flogo-ideas%2F&amp;title=Logo%20Ideas&amp;bodytext=Playing%20around%20with%20Illustrator%20again.%20Trying%20to%20come%20up%20with%20some%20branding%20for%20me.%20Working%20with%20the%20letters%20%22m%22%20and%20%22h%22%20%28psst%2C%20they%27re%20my%20initials%29.%20Here%27s%20one%20of%20my%20drafts%3A%0D%0A" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Flogo-ideas%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Flogo-ideas%2F&amp;title=Logo%20Ideas&amp;notes=Playing%20around%20with%20Illustrator%20again.%20Trying%20to%20come%20up%20with%20some%20branding%20for%20me.%20Working%20with%20the%20letters%20%22m%22%20and%20%22h%22%20%28psst%2C%20they%27re%20my%20initials%29.%20Here%27s%20one%20of%20my%20drafts%3A%0D%0A" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Flogo-ideas%2F&amp;t=Logo%20Ideas" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Flogo-ideas%2F&amp;title=Logo%20Ideas" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Flogo-ideas%2F&amp;title=Logo%20Ideas&amp;annotation=Playing%20around%20with%20Illustrator%20again.%20Trying%20to%20come%20up%20with%20some%20branding%20for%20me.%20Working%20with%20the%20letters%20%22m%22%20and%20%22h%22%20%28psst%2C%20they%27re%20my%20initials%29.%20Here%27s%20one%20of%20my%20drafts%3A%0D%0A" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Flogo-ideas%2F&amp;title=Logo%20Ideas&amp;source=Michael+Hartmayer+Portfolio+of+an+Idea+Crafter&amp;summary=Playing%20around%20with%20Illustrator%20again.%20Trying%20to%20come%20up%20with%20some%20branding%20for%20me.%20Working%20with%20the%20letters%20%22m%22%20and%20%22h%22%20%28psst%2C%20they%27re%20my%20initials%29.%20Here%27s%20one%20of%20my%20drafts%3A%0D%0A" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Flogo-ideas%2F&amp;title=Logo%20Ideas" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Flogo-ideas%2F&amp;t=Logo%20Ideas" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Flogo-ideas%2F&amp;title=Logo%20Ideas" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fnotice%2Flogo-ideas%2F&amp;title=Logo%20Ideas" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/notice/logo-ideas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text to Pixel Font!</title>
		<link>http://www.michaelhartmayer.com/fun/text-to-pixel-font/</link>
		<comments>http://www.michaelhartmayer.com/fun/text-to-pixel-font/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 03:19:10 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=513</guid>
		<description><![CDATA[So, this is a silly little proof of concept I came up with to kill 20 minutes in between projects. Takes regular text and turns it into 1px sized divs. That&#8217;s right, the div&#8217;s actually form the pixels of each letter! Awesome, right!? Check it out! jsTexty Example How&#8217;s it done? Easy: * Get the [...]]]></description>
			<content:encoded><![CDATA[<p>So, this is a silly little proof of concept I came up with to kill 20 minutes in between projects. Takes regular text and turns it into 1px sized divs. That&#8217;s right, the div&#8217;s actually form the pixels of each letter! <img src='http://www.michaelhartmayer.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Awesome, right!? Check it out!</p>
<p><a href="http://playground.michaelhartmayer.com/f/wip11/jsTexty.html" title="JavaScript Pixel Font" target="_blank">jsTexty Example</a></p>
<p>How&#8217;s it done? Easy:<br />
* Get the text of an element<br />
* Move through it, 1 character at a time<br />
* Match the character with a pattern (currently only supports lowercase)<br />
* Convert the pattern to markup<br />
* Replace the text with excessive amounts of html <img src='http://www.michaelhartmayer.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> jsTexty <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    jsTexty.<span style="color: #660066;">Make</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> strLetterString <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> strReplaceHtml <span style="color: #339933;">=</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>strLetterString.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> strThisLetter <span style="color: #339933;">=</span> strLetterString.<span style="color: #660066;">substr</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> jsTexty.<span style="color: #660066;">GetLetterCode</span><span style="color: #009900;">&#40;</span>strThisLetter<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                strReplaceHtml <span style="color: #339933;">+=</span> jsTexty.<span style="color: #660066;">LetterCodeToHtml</span><span style="color: #009900;">&#40;</span>arrLetterCode<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        $<span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>strReplaceHtml <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    jsTexty.<span style="color: #660066;">LetterCodeToHtml</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>arrLetterCode<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> strReplaceHtml <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;div class=&quot;lbBlock&quot;&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>arrLetterCode.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> strThisRow <span style="color: #339933;">=</span> arrLetterCode<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> j <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> j<span style="color: #339933;">&lt;</span>strThisRow<span style="color: #339933;">;</span> j<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #003366; font-weight: bold;">var</span> strThisLetterBlock <span style="color: #339933;">=</span> strThisRow.<span style="color: #660066;">substr</span><span style="color: #009900;">&#40;</span>j<span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>strThisLetterBlock<span style="color: #339933;">===</span><span style="color: #3366CC;">'1'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    strReplaceHtml <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;div class=&quot;lbSolid&quot;&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>strThisLetterBlock<span style="color: #339933;">===</span><span style="color: #3366CC;">'0'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    strReplaceHtml <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;div class=&quot;lbEmpty&quot;&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
            strReplaceHtml<span style="color: #339933;">+=</span><span style="color: #3366CC;">'&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">return</span> strReplaceHtml <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/div&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    jsTexty.<span style="color: #660066;">GetLetterCode</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>strSingleLetter<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">switch</span><span style="color: #009900;">&#40;</span>strSingleLetter<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">' '</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'0000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0000'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'a'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'0110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1111'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'b'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'1110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1110'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'c'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'0111'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0111'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'d'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'1110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1110'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'e'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'1111'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1111'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'f'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'1111'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'g'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'0111'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1011'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0111'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'h'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1111'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'i'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'111'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'111'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'j'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'0001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0110'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'k'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1100'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'l'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'1000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1111'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'m'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'10001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'11011'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'10101'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'10001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'10001'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'n'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'10001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'11001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'10101'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'10011'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'10001'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'o'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'0110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0110'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'p'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'1110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1000'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'q'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'0000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0111'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0001'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'r'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'1110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'s'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'0111'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1100'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0011'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1110'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'t'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'11111'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'00100'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'00100'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'00100'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'00100'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'u'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0110'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'v'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'10001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'10001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'01010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'01010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'00100'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'w'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'10101'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'10101'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'10101'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'10101'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'01010'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'x'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'10001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'01010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'00100'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'01010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'10001'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'y'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'10001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'01010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'00100'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'00100'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'00100'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'z'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'1111'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'0100'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'1111'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'.'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'110'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">','</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'010'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'!'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'010'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'('</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'100'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'100'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'100'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'010'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">')'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'010'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'010'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #3366CC;">'?'</span><span style="color: #339933;">:</span>
                <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
                <span style="color: #3366CC;">'01110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'00001'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'00110'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'00000'</span><span style="color: #339933;">,</span>
                <span style="color: #3366CC;">'00100'</span>
                <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>arrLetterCode<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> arrLetterCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
            <span style="color: #3366CC;">'1111'</span><span style="color: #339933;">,</span>
            <span style="color: #3366CC;">'1111'</span><span style="color: #339933;">,</span>
            <span style="color: #3366CC;">'1111'</span><span style="color: #339933;">,</span>
            <span style="color: #3366CC;">'1111'</span><span style="color: #339933;">,</span>
            <span style="color: #3366CC;">'1111'</span>
            <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>						
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">return</span> arrLetterCode<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// ACTIVATE</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#doit'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>jsTexty.<span style="color: #660066;">Make</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#letterBox'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Ftext-to-pixel-font%2F&amp;title=Text%20to%20Pixel%20Font%21&amp;bodytext=So%2C%20this%20is%20a%20silly%20little%20proof%20of%20concept%20I%20came%20up%20with%20to%20kill%2020%20minutes%20in%20between%20projects.%20Takes%20regular%20text%20and%20turns%20it%20into%201px%20sized%20divs.%20That%27s%20right%2C%20the%20div%27s%20actually%20form%20the%20pixels%20of%20each%20letter%21%20%3AD%20Awesome%2C%20right%21%3F%20Check%20it%20out%21" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Ftext-to-pixel-font%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Ftext-to-pixel-font%2F&amp;title=Text%20to%20Pixel%20Font%21&amp;notes=So%2C%20this%20is%20a%20silly%20little%20proof%20of%20concept%20I%20came%20up%20with%20to%20kill%2020%20minutes%20in%20between%20projects.%20Takes%20regular%20text%20and%20turns%20it%20into%201px%20sized%20divs.%20That%27s%20right%2C%20the%20div%27s%20actually%20form%20the%20pixels%20of%20each%20letter%21%20%3AD%20Awesome%2C%20right%21%3F%20Check%20it%20out%21" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Ftext-to-pixel-font%2F&amp;t=Text%20to%20Pixel%20Font%21" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Ftext-to-pixel-font%2F&amp;title=Text%20to%20Pixel%20Font%21" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Ftext-to-pixel-font%2F&amp;title=Text%20to%20Pixel%20Font%21&amp;annotation=So%2C%20this%20is%20a%20silly%20little%20proof%20of%20concept%20I%20came%20up%20with%20to%20kill%2020%20minutes%20in%20between%20projects.%20Takes%20regular%20text%20and%20turns%20it%20into%201px%20sized%20divs.%20That%27s%20right%2C%20the%20div%27s%20actually%20form%20the%20pixels%20of%20each%20letter%21%20%3AD%20Awesome%2C%20right%21%3F%20Check%20it%20out%21" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Ftext-to-pixel-font%2F&amp;title=Text%20to%20Pixel%20Font%21&amp;source=Michael+Hartmayer+Portfolio+of+an+Idea+Crafter&amp;summary=So%2C%20this%20is%20a%20silly%20little%20proof%20of%20concept%20I%20came%20up%20with%20to%20kill%2020%20minutes%20in%20between%20projects.%20Takes%20regular%20text%20and%20turns%20it%20into%201px%20sized%20divs.%20That%27s%20right%2C%20the%20div%27s%20actually%20form%20the%20pixels%20of%20each%20letter%21%20%3AD%20Awesome%2C%20right%21%3F%20Check%20it%20out%21" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Ftext-to-pixel-font%2F&amp;title=Text%20to%20Pixel%20Font%21" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Ftext-to-pixel-font%2F&amp;t=Text%20to%20Pixel%20Font%21" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Ftext-to-pixel-font%2F&amp;title=Text%20to%20Pixel%20Font%21" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Ffun%2Ftext-to-pixel-font%2F&amp;title=Text%20to%20Pixel%20Font%21" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/fun/text-to-pixel-font/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loading JavaScript Better :)</title>
		<link>http://www.michaelhartmayer.com/javascript/loading-javascript-better/</link>
		<comments>http://www.michaelhartmayer.com/javascript/loading-javascript-better/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 04:04:47 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[js javascript optimization]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=498</guid>
		<description><![CDATA[After watching some very stimulating google tech talks on YouTube, I walked away with some new insight on how browsers load content. The following is a technique I picked up that allows for all included javascripts to load in parallel (instead of sequentially), and to prioritize the loading of your visible page content first. The [...]]]></description>
			<content:encoded><![CDATA[<p>After watching some very stimulating google tech talks on YouTube, I walked away with some new insight on how browsers load content. The following is a technique I picked up that allows for all included javascripts to load in parallel (instead of sequentially), and to prioritize the loading of your visible page content first.</p>
<p>The following code is placed before the closing body tag (and not in the head, as is traditionally done).</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span> 
	<span style="color: #003366; font-weight: bold;">var</span> DocumentHead <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'head'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">function</span> jsOptimizedLoader<span style="color: #009900;">&#40;</span>src<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> Script <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			Script.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> src<span style="color: #339933;">;</span>
			Script.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">;</span>
			DocumentHead.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>Script<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	jsOptimizedLoader<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'js/app/foo.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	jsOptimizedLoader<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'js/app/bar.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	jsOptimizedLoader<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'js/app/boo.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	jsOptimizedLoader<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'js/app/far.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Once your DOM has finished loading, all the scripts tags are added to the head via javascript. Allowing your page to display PRIOR to spending the time loading all of those scripts will win you usability points and ease of access points with your audience.</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Floading-javascript-better%2F&amp;title=Loading%20JavaScript%20Better%20%3A%29&amp;bodytext=After%20watching%20some%20very%20stimulating%20google%20tech%20talks%20on%20YouTube%2C%20I%20walked%20away%20with%20some%20new%20insight%20on%20how%20browsers%20load%20content.%20The%20following%20is%20a%20technique%20I%20picked%20up%20that%20allows%20for%20all%20included%20javascripts%20to%20load%20in%20parallel%20%28instead%20of%20seq" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Floading-javascript-better%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Floading-javascript-better%2F&amp;title=Loading%20JavaScript%20Better%20%3A%29&amp;notes=After%20watching%20some%20very%20stimulating%20google%20tech%20talks%20on%20YouTube%2C%20I%20walked%20away%20with%20some%20new%20insight%20on%20how%20browsers%20load%20content.%20The%20following%20is%20a%20technique%20I%20picked%20up%20that%20allows%20for%20all%20included%20javascripts%20to%20load%20in%20parallel%20%28instead%20of%20seq" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Floading-javascript-better%2F&amp;t=Loading%20JavaScript%20Better%20%3A%29" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Floading-javascript-better%2F&amp;title=Loading%20JavaScript%20Better%20%3A%29" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Floading-javascript-better%2F&amp;title=Loading%20JavaScript%20Better%20%3A%29&amp;annotation=After%20watching%20some%20very%20stimulating%20google%20tech%20talks%20on%20YouTube%2C%20I%20walked%20away%20with%20some%20new%20insight%20on%20how%20browsers%20load%20content.%20The%20following%20is%20a%20technique%20I%20picked%20up%20that%20allows%20for%20all%20included%20javascripts%20to%20load%20in%20parallel%20%28instead%20of%20seq" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Floading-javascript-better%2F&amp;title=Loading%20JavaScript%20Better%20%3A%29&amp;source=Michael+Hartmayer+Portfolio+of+an+Idea+Crafter&amp;summary=After%20watching%20some%20very%20stimulating%20google%20tech%20talks%20on%20YouTube%2C%20I%20walked%20away%20with%20some%20new%20insight%20on%20how%20browsers%20load%20content.%20The%20following%20is%20a%20technique%20I%20picked%20up%20that%20allows%20for%20all%20included%20javascripts%20to%20load%20in%20parallel%20%28instead%20of%20seq" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Floading-javascript-better%2F&amp;title=Loading%20JavaScript%20Better%20%3A%29" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Floading-javascript-better%2F&amp;t=Loading%20JavaScript%20Better%20%3A%29" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Floading-javascript-better%2F&amp;title=Loading%20JavaScript%20Better%20%3A%29" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Fjavascript%2Floading-javascript-better%2F&amp;title=Loading%20JavaScript%20Better%20%3A%29" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/javascript/loading-javascript-better/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Parallax Class</title>
		<link>http://www.michaelhartmayer.com/actionscript-3/as3-parallax-class/</link>
		<comments>http://www.michaelhartmayer.com/actionscript-3/as3-parallax-class/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 09:12:44 +0000</pubDate>
		<dc:creator>Michael Hartmayer</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Parallax]]></category>

		<guid isPermaLink="false">http://www.michaelhartmayer.com/?p=462</guid>
		<description><![CDATA[Just something I&#8217;ve been toying with. I&#8217;ve always wanted to write a class to generate a nice Parallax Effect. Good practice. Class can be downloaded from: http://pastebin.com/86HYEJqA Implementation would look something like this: import Machinespark.SimpleParallax.SimpleParallax; var ParallaxHolder:MovieClip = new MovieClip&#40;&#41;; addChild&#40;ParallaxHolder&#41;; &#160; var NewParallax:SimpleParallax = new SimpleParallax&#40;stage.width, stage.height&#41;; NewParallax.AddPane&#40;new mcPane3, 3&#41;; NewParallax.AddPane&#40;new mcPane2, 6&#41;; NewParallax.AddPane&#40;new [...]]]></description>
			<content:encoded><![CDATA[<p>Just something I&#8217;ve been toying with. I&#8217;ve always wanted to write a class to generate a nice Parallax Effect. Good practice.</p>
<p>Class can be downloaded from: <a href="http://pastebin.com/86HYEJqA">http://pastebin.com/86HYEJqA</a></p>
<p>Implementation would look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> Machinespark.<span style="color: #006600;">SimpleParallax</span>.<span style="color: #006600;">SimpleParallax</span>;
<span style="color: #000000; font-weight: bold;">var</span> ParallaxHolder:<span style="color: #0066CC;">MovieClip</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">MovieClip</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	addChild<span style="color: #66cc66;">&#40;</span>ParallaxHolder<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> NewParallax:SimpleParallax = <span style="color: #000000; font-weight: bold;">new</span> SimpleParallax<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">width</span>, <span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>;
	NewParallax.<span style="color: #006600;">AddPane</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> mcPane3, <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>;
	NewParallax.<span style="color: #006600;">AddPane</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> mcPane2, <span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#41;</span>;
	NewParallax.<span style="color: #006600;">AddPane</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> mcPane1, <span style="color: #cc66cc;">9</span><span style="color: #66cc66;">&#41;</span>;
	NewParallax.<span style="color: #006600;">AttachParallax</span><span style="color: #66cc66;">&#40;</span>ParallaxHolder<span style="color: #66cc66;">&#41;</span>;
	NewParallax.<span style="color: #006600;">StartParallax</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>




Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Factionscript-3%2Fas3-parallax-class%2F&amp;title=AS3%20Parallax%20Class&amp;bodytext=Just%20something%20I%27ve%20been%20toying%20with.%20I%27ve%20always%20wanted%20to%20write%20a%20class%20to%20generate%20a%20nice%20Parallax%20Effect.%20Good%20practice.%0D%0A%0D%0AClass%20can%20be%20downloaded%20from%3A%20http%3A%2F%2Fpastebin.com%2F86HYEJqA%0D%0A%0D%0AImplementation%20would%20look%20something%20like%20this%3A%0D%0Aimport%20Machi" title="Digg"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.michaelhartmayer.com%2Factionscript-3%2Fas3-parallax-class%2F" title="Sphinn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Factionscript-3%2Fas3-parallax-class%2F&amp;title=AS3%20Parallax%20Class&amp;notes=Just%20something%20I%27ve%20been%20toying%20with.%20I%27ve%20always%20wanted%20to%20write%20a%20class%20to%20generate%20a%20nice%20Parallax%20Effect.%20Good%20practice.%0D%0A%0D%0AClass%20can%20be%20downloaded%20from%3A%20http%3A%2F%2Fpastebin.com%2F86HYEJqA%0D%0A%0D%0AImplementation%20would%20look%20something%20like%20this%3A%0D%0Aimport%20Machi" title="del.icio.us"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Factionscript-3%2Fas3-parallax-class%2F&amp;t=AS3%20Parallax%20Class" title="Facebook"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.michaelhartmayer.com%2Factionscript-3%2Fas3-parallax-class%2F&amp;title=AS3%20Parallax%20Class" title="Mixx"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.michaelhartmayer.com%2Factionscript-3%2Fas3-parallax-class%2F&amp;title=AS3%20Parallax%20Class&amp;annotation=Just%20something%20I%27ve%20been%20toying%20with.%20I%27ve%20always%20wanted%20to%20write%20a%20class%20to%20generate%20a%20nice%20Parallax%20Effect.%20Good%20practice.%0D%0A%0D%0AClass%20can%20be%20downloaded%20from%3A%20http%3A%2F%2Fpastebin.com%2F86HYEJqA%0D%0A%0D%0AImplementation%20would%20look%20something%20like%20this%3A%0D%0Aimport%20Machi" title="Google Bookmarks"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Factionscript-3%2Fas3-parallax-class%2F&amp;title=AS3%20Parallax%20Class&amp;source=Michael+Hartmayer+Portfolio+of+an+Idea+Crafter&amp;summary=Just%20something%20I%27ve%20been%20toying%20with.%20I%27ve%20always%20wanted%20to%20write%20a%20class%20to%20generate%20a%20nice%20Parallax%20Effect.%20Good%20practice.%0D%0A%0D%0AClass%20can%20be%20downloaded%20from%3A%20http%3A%2F%2Fpastebin.com%2F86HYEJqA%0D%0A%0D%0AImplementation%20would%20look%20something%20like%20this%3A%0D%0Aimport%20Machi" title="LinkedIn"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.michaelhartmayer.com%2Factionscript-3%2Fas3-parallax-class%2F&amp;title=AS3%20Parallax%20Class" title="Live"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.michaelhartmayer.com%2Factionscript-3%2Fas3-parallax-class%2F&amp;t=AS3%20Parallax%20Class" title="MySpace"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Factionscript-3%2Fas3-parallax-class%2F&amp;title=AS3%20Parallax%20Class" title="Reddit"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.michaelhartmayer.com%2Factionscript-3%2Fas3-parallax-class%2F&amp;title=AS3%20Parallax%20Class" title="StumbleUpon"><img src="http://www.michaelhartmayer.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.michaelhartmayer.com/actionscript-3/as3-parallax-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

