<?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>Ajaxian &#187; Examples</title>
	<atom:link href="http://ajaxian.com/by/topic/examples/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Wed, 17 Mar 2010 18:58:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ambilight Sample; video and canvas</title>
		<link>http://ajaxian.com/archives/ambilight</link>
		<comments>http://ajaxian.com/archives/ambilight#comments</comments>
		<pubDate>Fri, 12 Mar 2010 11:30:20 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Canvas]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8713</guid>
		<description><![CDATA[
Sergey Chikuyonok gets his Philips Ambilight foo on as he created a HTML5 video + canvas sample that mimics the TV effect.
As the video runs, a snapshot is sent over to JavaScript land where colors are worked out:
PLAIN TEXT
JAVASCRIPT:




&#160;


function getMidColors&#40;side&#41; &#123;


&#160; &#160; &#160; &#160; var w = buffer.width,


&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://ajaxian.com/wp-content/images/ambilight.png" alt="ambilight" title="ambilight" width="480" height="234" class="alignnone size-full wp-image-8714"/></p>
<p>Sergey Chikuyonok gets his Philips Ambilight foo on as he created a <a href="http://chikuyonok.ru/ambilight/">HTML5 video + canvas</a> sample that mimics the TV effect.</p>
<p>As the video runs, a snapshot is sent over to JavaScript land where colors are worked out:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-2');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-2">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> getMidColors<span style="color:#006600; font-weight:bold;">&#40;</span>side<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> w = buffer.<span style="color: #006600;">width</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; h = buffer.<span style="color: #006600;">height</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lamps = getOption<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'lamps'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; block_width = getOption<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'block_size'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; block_height = Math.<span style="color: #006600;">ceil</span><span style="color:#006600; font-weight:bold;">&#40;</span>h / lamps<span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pxl = block_width * block_height * <span style="color:#800000;">4</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; img_data = buffer_ctx.<span style="color: #006600;">getImageData</span><span style="color:#006600; font-weight:bold;">&#40;</span>side == <span style="color: #3366CC;">'right'</span> ? w - block_width : <span style="color:#800000;">0</span>, <span style="color:#800000;">0</span>, block_width, h<span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; total_pixels = img_data.<span style="color: #006600;">data</span>.<span style="color: #006600;">length</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">for</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i = <span style="color:#800000;">0</span>; i &lt;lamps; i++<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> from = i * w * block_width;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result.<span style="color: #006600;">push</span><span style="color:#006600; font-weight:bold;">&#40;</span> calcMidColor<span style="color:#006600; font-weight:bold;">&#40;</span>img_data.<span style="color: #006600;">data</span>, i * pxl, Math.<span style="color: #006600;">min</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span>i + <span style="color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span> * pxl, total_pixels - <span style="color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> result;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Then, two canvas objects are placed, one on each side, of the video itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/ambilight/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>CSS3 Please! Instant results&#8230; Thank You</title>
		<link>http://ajaxian.com/archives/css3-please-instant-results-thank-you</link>
		<comments>http://ajaxian.com/archives/css3-please-instant-results-thank-you#comments</comments>
		<pubDate>Wed, 10 Mar 2010 13:39:24 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8699</guid>
		<description><![CDATA[
Paul Irish and Jonathan Neal have created a fun example of various CSS tweaks that you can make, and see the results instantly.
CSS3, Please! lets you play with fancy new rules such as:

border-radius
box shadow
gradients
rgba support in backgrounds
transforms
font-face

Really nice way to make tweaks inline in the page..... nicely done. Hope to see some other examples out [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://ajaxian.com/wp-content/images/css3please.png" alt="css3please" title="css3please" width="480" height="286" class="alignnone size-full wp-image-8700"/></p>
<p><a href="http://paulirish.com/">Paul Irish</a> and <a href="http://twitter.com/jon_neal">Jonathan Neal</a> have created a fun example of various CSS tweaks that you can make, and see the results instantly.</p>
<p><a href="http://css3please.com/">CSS3, Please!</a> lets you play with fancy new rules such as:</p>
<ul>
<li>border-radius</li>
<li>box shadow</li>
<li>gradients</li>
<li>rgba support in backgrounds</li>
<li>transforms</li>
<li>font-face</li>
</ul>
<p>Really nice way to make tweaks inline in the page..... nicely done. Hope to see some other examples out there :)</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/css3-please-instant-results-thank-you/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>AT AT Walking with CSS</title>
		<link>http://ajaxian.com/archives/at-at-walking-with-css</link>
		<comments>http://ajaxian.com/archives/at-at-walking-with-css#comments</comments>
		<pubDate>Fri, 05 Feb 2010 11:17:52 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8530</guid>
		<description><![CDATA[
Anthony Calzadilla has a fun Friday example for us. He has a tutorial on how he animated an AT AT using CSS.
He goes over the different areas and how he uses animation and transforms.
For example, the head of the beast:
PLAIN TEXT
CSS:




&#160;


@-webkit-keyframes rotate-head{


&#160; 0% &#123;-webkit-transform:rotate&#40;0deg&#41; translate&#40;0px,0px&#41;;&#125;


&#160; 40% &#123;-webkit-transform:rotate&#40;10deg&#41; translate&#40;15px,5px&#41;;&#125;


&#160; 80% &#123;-webkit-transform:rotate&#40;-5deg&#41; translate&#40;8px,5px&#41;;&#125;


&#160; 100% &#123;-webkit-transform:rotate&#40;0deg&#41; translate&#40;0px,0px&#41;;&#125;


&#125;


#atat #head [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.optimum7.com/internet-marketing/wp-content/uploads/2010/02/article-atat.jpg"/></p>
<p>Anthony Calzadilla has a fun Friday example for us. He has a tutorial on how he <a href="http://anthonycalzadilla.com/css3-ATAT/index.html">animated an AT AT using CSS</a>.</p>
<p>He goes over the different areas and how he uses animation and transforms.</p>
<p>For example, the head of the beast:</p>
<div class="igBar"><a href="javascript:showCodeTxt('css-4');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CSS:</span>
<div id="css-4">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">@-webkit-keyframes rotate-head{</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">0</span>% <span style="color:#006600; font-weight:bold;">&#123;</span>-webkit-transform:rotate<span style="color:#006600; font-weight:bold;">&#40;</span>0deg<span style="color:#006600; font-weight:bold;">&#41;</span> translate<span style="color:#006600; font-weight:bold;">&#40;</span>0px,0px<span style="color:#006600; font-weight:bold;">&#41;</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">40</span>% <span style="color:#006600; font-weight:bold;">&#123;</span>-webkit-transform:rotate<span style="color:#006600; font-weight:bold;">&#40;</span>10deg<span style="color:#006600; font-weight:bold;">&#41;</span> translate<span style="color:#006600; font-weight:bold;">&#40;</span>15px,5px<span style="color:#006600; font-weight:bold;">&#41;</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">80</span>% <span style="color:#006600; font-weight:bold;">&#123;</span>-webkit-transform:rotate<span style="color:#006600; font-weight:bold;">&#40;</span>-5deg<span style="color:#006600; font-weight:bold;">&#41;</span> translate<span style="color:#006600; font-weight:bold;">&#40;</span>8px,5px<span style="color:#006600; font-weight:bold;">&#41;</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">100</span>% <span style="color:#006600; font-weight:bold;">&#123;</span>-webkit-transform:rotate<span style="color:#006600; font-weight:bold;">&#40;</span>0deg<span style="color:#006600; font-weight:bold;">&#41;</span> translate<span style="color:#006600; font-weight:bold;">&#40;</span>0px,0px<span style="color:#006600; font-weight:bold;">&#41;</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">#atat <span style="color: #cc00cc;">#head <span style="color:#006600; font-weight:bold;">&#123;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-animation-name: rotate-head;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-animation-duration: 7s;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-animation-iteration-count: infinite; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-transform-origin: <span style="color:#800000;">0</span> <span style="color:#800000;">50</span>%;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/at-at-walking-with-css/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Addmap.js &#8211; automatically analyse a text for geo locations and add a map</title>
		<link>http://ajaxian.com/archives/addmap-js-automatically-analyse-a-text-for-geo-locations-and-add-a-map</link>
		<comments>http://ajaxian.com/archives/addmap-js-automatically-analyse-a-text-for-geo-locations-and-add-a-map#comments</comments>
		<pubDate>Fri, 29 Jan 2010 15:17:47 +0000</pubDate>
		<dc:creator>Chris Heilmann</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Geo]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mapping]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[analisys]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[placemaker]]></category>
		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8503</guid>
		<description><![CDATA[As part of an upcoming article on geo location I am putting together a few Geo Toys for myself and here is the first one. Addmap.js is a JavaScript that analyses an elements text content, finds geographical locations and links them to Google Maps. It also adds a map preview and a list of the [...]]]></description>
			<content:encoded><![CDATA[<p>As part of an upcoming article on geo location I am putting together a few <a href="http://github.com/codepo8/geotoys">Geo Toys</a> for myself and here is the first one. Addmap.js is a JavaScript that analyses an elements text content, finds geographical locations and links them to Google Maps. It also adds a map preview and a list of the found locations to the element.</p>
<p>See addmap.js in action below - all the content in the green box is generated from the paragraph of text above it. You can try it out for yourself by clicking the screenshot.</p>
<p><a href="http://isithackday.com/hacks/geo/addmap.html"><img src="http://ajaxian.com/wp-content/images/textandmap.png" alt="Demonstration screenshot of addmap.js" title="Demo of addmap.js" width="557" height="282" class="size-full wp-image-8502" /></a></p>
<p>Using addmap.js is easy - sign up for a <a href="http://code.google.com/apis/maps/signup.html">Google Maps Key</a> and provide it as a configuration parameter. Then call the analyse function with the ID of the element to analyse as the parameter:</p>
<div class="igBar"><a href="javascript:showCodeTxt('xml-6');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">XML:</span>
<div id="xml-6">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;script</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">"http://github.com/codepo8/geotoys/raw/master/addmap.js"</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/script<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;script<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">addmap.config.mapkey = 'YOUR_API_KEY';</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">addmap.analyse('content');</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/script<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>The script uses <a href="http://developer.yahoo.com/yql">YQL</a> and <a href="http://developer.yahoo.com/geo/placemaker">Yahoo PlaceMaker</a> under the hood, for more info and updates on this, <a href="http://www.wait-till-i.com/2010/01/29/adding-map-links-and-a-small-map-to-any-text-using-javascript-addmap-js/">check the blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/addmap-js-automatically-analyse-a-text-for-geo-locations-and-add-a-map/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Web 2.Snow</title>
		<link>http://ajaxian.com/archives/web-2-snow</link>
		<comments>http://ajaxian.com/archives/web-2-snow#comments</comments>
		<pubDate>Thu, 31 Dec 2009 13:13:16 +0000</pubDate>
		<dc:creator>webreflection</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8369</guid>
		<description><![CDATA[When I talked about some snow related CSS3 experiment, I could not imagine @Natbat was already preparing something like snowflakes, an almost fully CSS3 featured snow FX created for clearleft, specially suited for Chrome and Safari.
And what about @zacharyjohnson? He put snow all over the network via its Winternetizer, the first snow proxy I have [...]]]></description>
			<content:encoded><![CDATA[<p>When I talked about some snow related CSS3 experiment, I could not imagine @<a href="http://twitter.com/Natbat">Natbat</a> was already preparing something like <a href="http://natbat.net/code/clientside/css/snowflakes/">snowflakes</a>, an almost fully CSS3 featured snow FX created for <a href="http://clearleft.com/">clearleft</a>, specially suited for Chrome and Safari.</p>
<p>And what about @<a href="http://twitter.com/zacharyjohnson">zacharyjohnson</a>? He put snow all over the network via its <a href="http://www.zachstronaut.com/winternetizer/ajaxian.com">Winternetizer</a>, the first <em>snow proxy</em> I have ever seen.</p>
<p>Am I missing anybody? ... sure, me!</p>
<p><iframe height="200" frameborder="0" width="470" style="border: 0pt none;" src="http://www.3site.eu/examples/snow/ajaxian.html"></iframe></p>
<p><a href="http://www.3site.eu/examples/snow/ajaxian.html">Above FX</a> is dedicated to all Ajaxian readers and created via some <a href="http://www.3site.eu/examples/snow/snow.css">CSS3</a> rule handled via <a href="http://www.3site.eu/examples/snow/snow.js">JavaScript</a> for a partial cross browser implementation. WebKit based browsers, included Android and iPhone, plus Firefox 3.6, should render properly, while the most interesting thing, snow a part, is that for the first time rather than browser sniffing, I have implemented a sort of "screen resolution to power computation" sniff:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-8');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-8">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> totalSnowFlakes = Math.<span style="color: #006600;">max</span><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Math.<span style="color: #006600;">min</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; document.<span style="color: #006600;">documentElement</span>.<span style="color: #006600;">offsetWidth</span> *</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; document.<span style="color: #006600;">documentElement</span>.<span style="color: #006600;">offsetHeight</span> /</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;">15000</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#41;</span>&gt;&gt; <span style="color:#800000;">0</span>, <span style="color:#800000;">40</span><span style="color:#006600; font-weight:bold;">&#41;</span>, <span style="color:#800000;">10</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Probably not perfect, the aim is to avoid same number of flakes in mobile devices, netbooks, or desktop PCs.<br />
I guess one day we'll have exposed CPU model and RAM amount as read only userAgent properties, so that all new effects could avoid stress for web surfers.<br />
Something like System namespace in ActionScript, with capabilities for audio and video and extra info about the current navigator ... maybe just an AS to JS bridge 'till that day? We'll see, today the important thing is simply one: Have Fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/web-2-snow/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Star Wars HTML and CSS: A NEW HOPE</title>
		<link>http://ajaxian.com/archives/star-wars-html-and-css-a-new-hope</link>
		<comments>http://ajaxian.com/archives/star-wars-html-and-css-a-new-hope#comments</comments>
		<pubDate>Tue, 01 Dec 2009 12:00:19 +0000</pubDate>
		<dc:creator>webreflection</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8064</guid>
		<description><![CDATA[There are a lot of CSS transitions experiments going on right now. Yesterday I discovered another HTML and CSS experiment which went "far far away", compared with my simple CSS gallery.
Guillermo Esteves presented a piece of history translated for tomorrows browsers:  the Star Wars Episode IV opening crawl in HTML and CSS:

Unfortunately, the live experiment [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lot of CSS transitions experiments going on right now. Yesterday I discovered another HTML and CSS experiment which went "<em>far far away</em>", compared with my <a href="http://www.3site.eu/examples/gallery/">simple CSS gallery</a>.</p>
<p><a href="http://twitter.com/gesteves">Guillermo Esteves</a> presented a piece of history translated for tomorrows browsers:  the <strong>Star Wars Episode IV</strong> opening crawl in HTML and CSS:</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/wTbioEQ_FcE&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/wTbioEQ_FcE&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>Unfortunately, the <a href="http://www.gesteves.com/experiments/starwars.html">live experiment</a> is not suitable for all browsers and the ideal target seems to be only OSX 10.6 and its latest Safari browser but it partially worked via Google Chrome as well.</p>
<h3>Something To Learn About</h3>
<p>We are moving complex computations into our favorite "decoration layer": CSS<br />
We also want as much control as possible, and the above concept is brilliant to understand how to tame CSS transitions.<br />
This example includes new and different techniques. Here is what I found interesting:</p>
<h3>@font-face</h3>
<p>OK, this is not new at all, but in this case I could not find a single valid reason to avoid the original font: a must! The only point here is that the author could have saved a bit of bandwidth via pre-deflated or gzipped fonts rather than serving them without any apparent optimization.</p>
<div class="igBar"><a href="javascript:showCodeTxt('css-17');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CSS:</span>
<div id="css-17">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">@font-face {</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">font-family</span>: FGB;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;src: <span style="color: #993333;">url</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"/experiments/frabk.ttf"</span><span style="color:#006600; font-weight:bold;">&#41;</span> format<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"truetype"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>It's a shame there is not the real STAR WARS font as well but just an image ... anyway, let's move into more concrete stuff ...</p>
<h3>Perspective</h3>
<div class="igBar"><a href="javascript:showCodeTxt('css-18');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CSS:</span>
<div id="css-18">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#stage <span style="color:#006600; font-weight:bold;">&#123;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">height</span>:600px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">width</span>:1000px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">overflow</span>:<span style="color: #993333;">hidden</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">margin</span>: <span style="color:#800000;">0</span> <span style="color: #993333;">auto</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-perspective:<span style="color:#800000;">800</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-perspective-origin<span style="color: #3333ff;">:<span style="color: #993333;">center</span> </span>300px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>The stage is the block element where the magic happens. The perspective property is able to give us a "deep space" 3D feeling making closer objects look larger than further ones. Via origin modification we can decide where things should disappear, in this case a bit higher point than a central 400px, to create a similar atmosphere respecting the movie choice (and I guess to make content readable as well).</p>
<h3>Iteration-count and Custom transitions</h3>
<div class="igBar"><a href="javascript:showCodeTxt('css-19');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CSS:</span>
<div id="css-19">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#far-far-away <span style="color:#006600; font-weight:bold;">&#123;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">color</span>:<span style="color: #993333;">rgb</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">75</span>,<span style="color:#800000;">213</span>,<span style="color:#800000;">238</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">font-family</span>:FGB, <span style="color: #993333;">sans-serif</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">font-size</span>:48px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; line-<span style="color: #000000; font-weight: bold;">height</span>:<span style="color:#800000;">1</span>.<span style="color:#800000;">5</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">position</span>:<span style="color: #993333;">absolute</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">top</span>:200px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">left</span>:190px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; opacity:<span style="color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-animation<span style="color: #3333ff;">:fade-in-out </span>6s linear;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-animation-iteration-count: <span style="color:#800000;">1</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-animation-delay:5s;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Far far away is the initial text. As we can see with other browsers as well this appears and disappear in 6 seconds.<br />
This fade-in-out happens just once, so at the end of the effect, unless we won't modify the node class, the element won't be displayed anymore. This is what the animation-iteration-count property does while next snippet is the fade-in-out customization:</p>
<div class="igBar"><a href="javascript:showCodeTxt('css-20');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CSS:</span>
<div id="css-20">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">@-webkit-keyframes fade-in-out {</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">0</span>% <span style="color:#006600; font-weight:bold;">&#123;</span> opacity:<span style="color:#800000;">0</span>; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">16</span>%&nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#123;</span> opacity:<span style="color:#800000;">1</span>; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">84</span>%&nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#123;</span> opacity:<span style="color:#800000;">1</span>; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">100</span>%&nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#123;</span> opacity:<span style="color:#800000;">0</span>; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Via keyframes &lt;transition_name&gt; we can blend FX linearity deciding the amount of opacity, or other properties, at certain moments.<br />
A generic normal linear fade-in-out would be visible 100% only in the middle of the transition while in this case it is forced to be visible for 68% of the time, making fade in and out still homogeneous but controlling the full opacity for longer.<br />
We could have used an ease-in-out effect over opacity property to obtain a similar result but I find definitively more interesting this kind of approach.</p>
<h3>Warp Speed: Action!</h3>
<p>Thanks to Z axis transitions the initial STAR WARS image can appear and disappear using again a customized FX:</p>
<div class="igBar"><a href="javascript:showCodeTxt('css-21');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CSS:</span>
<div id="css-21">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">@-webkit-keyframes logo {</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">0</span>% <span style="color:#006600; font-weight:bold;">&#123;</span> -webkit-transform: translateZ<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>; opacity:<span style="color:#800000;">1</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">50</span>% <span style="color:#006600; font-weight:bold;">&#123;</span> -webkit-transform: translateZ<span style="color:#006600; font-weight:bold;">&#40;</span>-50000px<span style="color:#006600; font-weight:bold;">&#41;</span>; opacity:<span style="color:#800000;">1</span>; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">60</span>% <span style="color:#006600; font-weight:bold;">&#123;</span> -webkit-transform: translateZ<span style="color:#006600; font-weight:bold;">&#40;</span>-60000px<span style="color:#006600; font-weight:bold;">&#41;</span>; opacity:<span style="color:#800000;">0</span>; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">100</span>%&nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#123;</span> -webkit-transform: translateZ<span style="color:#006600; font-weight:bold;">&#40;</span>-100000px<span style="color:#006600; font-weight:bold;">&#41;</span>; opacity:<span style="color:#800000;">0</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* few lines after, img is the only logo image */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">img <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; opacity:<span style="color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">position</span>:<span style="color: #993333;">absolute</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">top</span>:100px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">width</span>:1000px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-transform-origin<span style="color: #3333ff;">:<span style="color: #993333;">center</span> </span>center;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">/* above custom logo animation */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-animation<span style="color: #3333ff;">:logo </span>25s linear;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-animation-iteration-count: <span style="color:#800000;">1</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">/* suspance before the logo ... */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-animation-delay: 12s;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">/* logo appears slower and fly away faster */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-animation-timing-function: ease-in;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Above mix of webkit properties suggests me that new JavaScript libraries will use run-time actions to CSS transformations soon, rather than hard and manual JS computations over computed styles or similar expensive operations.<br />
We can control delays, we can stop FXs removing classes or simply overwriting existent directives and, moreover, we can split the CSS itself into logical parts as the same @gesteves did, putting custom animations all together: good hint!</p>
<h3>The Crawl</h3>
<p>Last piece to check out is the text plus its title.</p>
<div class="igBar"><a href="javascript:showCodeTxt('css-22');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CSS:</span>
<div id="css-22">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* custom crawl FX */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">@-webkit-keyframes crawl {</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">/* axis management until it disappears */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">0</span>% <span style="color:#006600; font-weight:bold;">&#123;</span> -webkit-transform:rotateX<span style="color:#006600; font-weight:bold;">&#40;</span>80deg<span style="color:#006600; font-weight:bold;">&#41;</span> translateZ<span style="color:#006600; font-weight:bold;">&#40;</span>300px<span style="color:#006600; font-weight:bold;">&#41;</span> translateY<span style="color:#006600; font-weight:bold;">&#40;</span>1100px<span style="color:#006600; font-weight:bold;">&#41;</span>;opacity:<span style="color:#800000;">1</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">40</span>% <span style="color:#006600; font-weight:bold;">&#123;</span> -webkit-transform:rotateX<span style="color:#006600; font-weight:bold;">&#40;</span>80deg<span style="color:#006600; font-weight:bold;">&#41;</span> translateZ<span style="color:#006600; font-weight:bold;">&#40;</span>300px<span style="color:#006600; font-weight:bold;">&#41;</span> translateY<span style="color:#006600; font-weight:bold;">&#40;</span>-340px<span style="color:#006600; font-weight:bold;">&#41;</span>;opacity:<span style="color:#800000;">1</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">80</span>% <span style="color:#006600; font-weight:bold;">&#123;</span> -webkit-transform:rotateX<span style="color:#006600; font-weight:bold;">&#40;</span>80deg<span style="color:#006600; font-weight:bold;">&#41;</span> translateZ<span style="color:#006600; font-weight:bold;">&#40;</span>300px<span style="color:#006600; font-weight:bold;">&#41;</span> translateY<span style="color:#006600; font-weight:bold;">&#40;</span>-1780px<span style="color:#006600; font-weight:bold;">&#41;</span>;opacity:<span style="color:#800000;">0</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#800000;">100</span>% <span style="color:#006600; font-weight:bold;">&#123;</span> -webkit-transform:rotateX<span style="color:#006600; font-weight:bold;">&#40;</span>80deg<span style="color:#006600; font-weight:bold;">&#41;</span> translateZ<span style="color:#006600; font-weight:bold;">&#40;</span>300px<span style="color:#006600; font-weight:bold;">&#41;</span> translateY<span style="color:#006600; font-weight:bold;">&#40;</span>-2500px<span style="color:#006600; font-weight:bold;">&#41;</span>;opacity:<span style="color:#800000;">0</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#crawl <span style="color:#006600; font-weight:bold;">&#123;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">color</span>:<span style="color: #993333;">rgb</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">252</span>,<span style="color:#800000;">223</span>,<span style="color:#800000;">43</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">font-family</span>:FGD, <span style="color: #993333;">sans-serif</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">text-align</span>:<span style="color: #993333;">center</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">font-size</span>:36px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; opacity:<span style="color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">/* long animation */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-animation<span style="color: #3333ff;">:crawl </span>120s linear;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">/* again just once */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-animation-iteration-count: <span style="color:#800000;">1</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">/* starting while the logo is still there */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-animation-delay:16s;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">/* preserving 3D aspect for the entire animation */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-transform-style:preserve-3d;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">#crawl p<span style="color: #6666ff;">.title </span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">font-family</span>:FGDC, <span style="color: #993333;">sans-serif</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">/* it's a title */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">text-transform</span>:<span style="color: #993333;">uppercase</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">/* it's massive */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">font-size</span>:96px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">/* but scaled to fit inside margins */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; -webkit-transform:scaleX<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>.<span style="color:#800000;">6</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">#crawl p <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">/* preserve spaces */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">white-space</span>:pre;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<h3>The Mythical Song</h3>
<p>Well, this demo could not miss a proper audio element:</p>
<div class="igBar"><a href="javascript:showCodeTxt('html-23');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">HTML:</span>
<div id="html-23">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;">&lt;audio <span style="color: #000066;">src</span>=<span style="color: #ff0000;">"/experiments/starwars.m4a"</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"audio"</span> autobuffer=<span style="color: #ff0000;">"autobuffer"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Apparently the used compression is truly good and the sound loud and clear. But who is in charge to start above song?</p>
<h3>JavaScript</h3>
<p>Quite hilarious all this demo does not basically need JavaScript at all except for an audio delay forced via interval:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-24');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-24">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">setTimeout<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"document.getElementById('audio').play()"</span>, <span style="color:#800000;">12000</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>If we have a good broadband connection and we are sure in 12 seconds we have buffered enough audio, the synchronization between JavaScript and the transition delay is almost perfect and the demo experience unique.</p>
<p>It is great to see this work, and I look forward to seeing what he comes up with next. It feels that with HTML5, CSS3, and the Web.Next we will be able to be much more creative. Finally, it's December, I can already imagine a CSS3 based snow effect for our pages ... no?</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/star-wars-html-and-css-a-new-hope/feed</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>If That Is An Awesome CSS3 Gallery, How Would You Call Mine?</title>
		<link>http://ajaxian.com/archives/if-that-is-an-awesome-css3-gallery-how-would-you-call-mine</link>
		<comments>http://ajaxian.com/archives/if-that-is-an-awesome-css3-gallery-how-would-you-call-mine#comments</comments>
		<pubDate>Thu, 26 Nov 2009 11:00:00 +0000</pubDate>
		<dc:creator>webreflection</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Section]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8033</guid>
		<description><![CDATA[Tutorialzine is a nice blog but I think sometimes it should should re-dimension chosen titles.
I have discovered only yesterday and thanks to my good old favorite Web related italian blog, a nice (or if you prefer another) jQuery lightbox style experiment.
The post is complete with examples and explanation over PHP, CSS, jQuery, and finally jQuery [...]]]></description>
			<content:encoded><![CDATA[<p>Tutorialzine is a nice blog but I think sometimes it should should re-dimension chosen titles.<br />
I have discovered only yesterday and thanks to my good old favorite Web related <a href="http://blog.html.it/25/11/2009/lightbox-in-salsa-css3/">italian blog</a>, a nice (or if you prefer another) <a href="http://tutorialzine.com/2009/11/hovering-gallery-css3-jquery/">jQuery lightbox style experiment</a>.</p>
<p>The post is complete with examples and explanation over PHP, CSS, jQuery, and finally jQuery UI.<br />
So what is the problem? The title: <strong>An Awesome CSS3 Lightbox Gallery With jQuery</strong></p>
<p>At the end of the day, the total size of the demo is massive, compared with what it offers, plus the only piece of CSS3 in the stylesheet is a <em>box-shadow</em> and a rotation via <em>-webkit-transform</em>.</p>
<h3>Is That It?</h3>
<p>If we can define awesome a basic usage of CSS3 requiring both jQuery and jQuery UI to create a Gallery, included a server side language, how can we define my <a href="http://www.3site.eu/examples/gallery/">latest experiment</a> realized in half an hour and <strong>without</strong> using <strong>JavaScript</strong>, <strong>PHP</strong>, or whatever programming language at all?</p>
<p><img class="alignnone" title="WebReflection CSS3 Gallery Example" src="http://www.3site.eu/ajaxian/gallery.jpg" alt="" width="470" height="384" /></p>
<p>The answer is simple: <strong>CSS3</strong> and we can read how I did it via the not-minified and hopefully well commented <a href="http://www.3site.eu/examples/gallery/css/gallery.css">css file</a>.<br />
OK, agreed my page is dynamically fake and a proof of concept, but honestly, which title would consider appropriate for above example?<br />
Thanks in any case to Tutorialzine for the interesting step by step explanation and to let me try above experiment which works with latest WebKit, Chrome, Safari, and somehow with Firefox, I've not tried the nightly, and Opera as well but in latter cases without transitions.</p>
<p>P.S. for those with poor computation performances like me, <a href="http://www.3site.eu/examples/gallery/netbook.html">here</a> there is a fluid concept variation ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/if-that-is-an-awesome-css3-gallery-how-would-you-call-mine/feed</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>Cappuccino is a Push over</title>
		<link>http://ajaxian.com/archives/cappuccino-is-a-push-over</link>
		<comments>http://ajaxian.com/archives/cappuccino-is-a-push-over#comments</comments>
		<pubDate>Tue, 29 Sep 2009 11:11:45 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Cappuccino]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=7468</guid>
		<description><![CDATA[
Elias Klughammer has implemented the Juggernaut push server in a Cappuccino app.
Always nice to have an open source bare bones sample app for a marriage like this. Nothing beats looking at the source.
]]></description>
			<content:encoded><![CDATA[<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/cU_6xMr6A0I&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/cU_6xMr6A0I&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>Elias Klughammer has implemented the <a href="http://juggernaut.rubyforge.org/">Juggernaut push server</a> in a <a href="http://www.cappuccino.org/">Cappuccino</a> app.</p>
<p>Always nice to have an open source bare bones sample app for a marriage like this. Nothing beats <a href="http://github.com/eliasklughammer/Cappuccino-X-Juggernaut/tree/master/app/views/">looking at the source</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/cappuccino-is-a-push-over/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Developer evangelism handbook released</title>
		<link>http://ajaxian.com/archives/developer-evangelism-handbook-released</link>
		<comments>http://ajaxian.com/archives/developer-evangelism-handbook-released#comments</comments>
		<pubDate>Tue, 28 Jul 2009 20:59:53 +0000</pubDate>
		<dc:creator>Chris Heilmann</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Presentation]]></category>
		<category><![CDATA[Workshop]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[evangelism]]></category>
		<category><![CDATA[handbook]]></category>
		<category><![CDATA[speaking]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=7147</guid>
		<description><![CDATA[As developers, it can be hard to get your voice heard in a company. Whilst our products depend on developers building them the right way, other people seem to call the shots about where they are going. 
This becomes disastrous when a company tries to reach developers with their product. Normal marketing and PR stunts [...]]]></description>
			<content:encoded><![CDATA[<p>As developers, it can be hard to get your voice heard in a company. Whilst our products depend on developers building them the right way, other people seem to call the shots about where they are going. </p>
<p>This becomes disastrous when a company tries to reach developers with their product. Normal marketing and PR stunts normally fail to get us excited. To work around this issue, clever companies allow developers to move into a role of developer evangelists. </p>
<blockquote><p>A developer evangelist is a spokesperson, mediator and translator between a company and both its technical staff and outside developers.</p></blockquote>
<p>This is my job at the moment, and I was asked by people I trained if there is a handbook about the skills needed to do this job, so I wrote one.</p>
<p>Check out the <a href="http://developer-evangelism.com">The Developer Evangelist handbook</a> </p>
<p>The handbook explains several things:</p>
<li>What developer evangelism is</li>
<li>What makes a good developer evangelist</li>
<li>How to write for the web</li>
<li>How to use social media and the web to promote content</li>
<li>How to deliver great presentations</li>
<li>How to deal with criticism of your company and what to do with the competition</li>
<li>How to write easy to understand and useful code examples</li>
<p>The handbook is Creative Commons and free to use. I am working on getting a printed version out, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/developer-evangelism-handbook-released/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>It&#8217;s Friday. Play some drums&#8230;. HTML5 style</title>
		<link>http://ajaxian.com/archives/its-friday-play-some-drums-html5-style</link>
		<comments>http://ajaxian.com/archives/its-friday-play-some-drums-html5-style#comments</comments>
		<pubDate>Fri, 03 Jul 2009 13:11:53 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Sound]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=7046</guid>
		<description><![CDATA[
Brian Arnold created a fun sample drum machine simulator using HTML5 &#60;audio&#62;.
PLAIN TEXT
JAVASCRIPT:




&#160;


function playBeat&#40;&#41; &#123;


&#160; &#160; &#160; &#160; if &#40;isPlaying&#41; &#123;


&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; var nextBeat = 60000 / curTempo / 4;


&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; // Turn off all lights on the tracker's row


&#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://ajaxian.com/wp-content/uploads/drummachine.png" alt="" title="drummachine" width="500" height="157" class="alignnone size-full wp-image-7047" /></p>
<p>Brian Arnold <a href="http://www.randomthink.net/lab/html5drums/">created a fun sample drum machine</a> simulator using HTML5 &lt;audio&gt;.</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-26');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-26">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> playBeat<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>isPlaying<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> nextBeat = <span style="color:#800000;">60000</span> <span style="color: #0066FF;">/ curTempo /</span> <span style="color:#800000;">4</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Turn off all lights on the tracker's row</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"#tracker li.pip"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">removeClass</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"active"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Stop all audio</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stopAllAudio<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Light up the tracker on the current pip</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"#tracker li.pip.col_"</span> + curBeat<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">addClass</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"active"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Find each active beat, play it</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">".soundrow[id^=control] li.pip.active.col_"</span> + curBeat<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">each</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span>i<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.<span style="color: #006600;">getElementById</span><span style="color:#006600; font-weight:bold;">&#40;</span>$<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">data</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'sound_id'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">play</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Move the pip forward</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; curBeat = <span style="color:#006600; font-weight:bold;">&#40;</span>curBeat + <span style="color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span> % <span style="color:#800000;">16</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Schedule the next one</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setTimeout<span style="color:#006600; font-weight:bold;">&#40;</span>playBeat, nextBeat<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>That's not all Brian is working on:</p>
<blockquote><p>
I'm <a href="http://www.randomthink.net/lab/fivorion/">also working on something</a> like the ToneMatrix or Tenori-on (Flash and actual devices, respectively) in pure HTML/JS. It works too, but the sounds aren't exactly designed to be great together (it's currently working on a C scale) and so if you're careful, you can get some decent sound but otherwise, it'll hurt your ears.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/its-friday-play-some-drums-html5-style/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Fun with text-shadow</title>
		<link>http://ajaxian.com/archives/fun-with-text-shadow</link>
		<comments>http://ajaxian.com/archives/fun-with-text-shadow#comments</comments>
		<pubDate>Fri, 26 Jun 2009 16:26:24 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=7016</guid>
		<description><![CDATA[
Zach Johnson is at it again, this time giving us a fun Friday treat with CSS text shadow, all via:
PLAIN TEXT
JAVASCRIPT:




&#160;


document.getElementById&#40;'text-shadow-box'&#41;.onmousemove = function&#40;e&#41; &#123;


&#160; &#160; var xm = e.clientX - 300;


&#160; &#160; var ym = e.clientY - 175;


&#160; &#160; var d = Math.sqrt&#40;xm*xm + ym*ym&#41;;


&#160; &#160; text.style.textShadow = -xm + 'px ' + -ym + [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://ajaxian.com/wp-content/uploads/textshadow.png" alt="" title="textshadow" width="499" height="345" class="alignnone size-full wp-image-7017" /></p>
<p>Zach Johnson is at it again, this time giving us a fun Friday <a href="http://www.zachstronaut.com/lab/text-shadow-box/text-shadow-box.html">treat with CSS text shadow</a>, all via:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-28');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-28">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">document.<span style="color: #006600;">getElementById</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'text-shadow-box'</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">onmousemove</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span>e<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> xm = e.<span style="color: #006600;">clientX</span> - <span style="color:#800000;">300</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> ym = e.<span style="color: #006600;">clientY</span> - <span style="color:#800000;">175</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> d = Math.<span style="color: #006600;">sqrt</span><span style="color:#006600; font-weight:bold;">&#40;</span>xm*xm + ym*ym<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; text.<span style="color: #006600;">style</span>.<span style="color: #006600;">textShadow</span> = -xm + <span style="color: #3366CC;">'px '</span> + -ym + <span style="color: #3366CC;">'px '</span> + <span style="color:#006600; font-weight:bold;">&#40;</span>d / <span style="color:#800000;">5</span> + <span style="color:#800000;">10</span><span style="color:#006600; font-weight:bold;">&#41;</span> + <span style="color: #3366CC;">'px black'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; xm = e.<span style="color: #006600;">clientX</span> - <span style="color:#800000;">600</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ym = e.<span style="color: #006600;">clientY</span> - <span style="color:#800000;">450</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; spot.<span style="color: #006600;">style</span>.<span style="color: #006600;">backgroundPosition</span> = xm + <span style="color: #3366CC;">'px '</span> + ym + <span style="color: #3366CC;">'px'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/fun-with-text-shadow/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Animating SVG with Canvas and Burst</title>
		<link>http://ajaxian.com/archives/svgburst</link>
		<comments>http://ajaxian.com/archives/svgburst#comments</comments>
		<pubDate>Thu, 11 Jun 2009 12:54:35 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6929</guid>
		<description><![CDATA[
Christopher Blizzard and his team are doing great write-ups on hacks.mozilla.org as they celebrate 35 days of Open Web goodness.
They just posted on the work of Alistair MacDonald who used his Burst engine to demonstrate taking SVG and having Burst load it and convert it all to JavaScript objects that are rendered inside of a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://hacks.mozilla.org/"><img src="http://hacks.mozilla.org/wp-content/uploads/2009/06/hacks_180x150.png" style="float: right; padding: 6px; border: none"/></a></p>
<p>Christopher Blizzard and his team are doing great write-ups on <a href="http://hacks.mozilla.org/">hacks.mozilla.org</a> as they celebrate 35 days of Open Web goodness.</p>
<p>They just posted on the work of <a href="http://hyper-metrix.com/">Alistair MacDonald</a> who used his <a href="http://hyper-metrix.com/#Burst">Burst</a> engine to <a href="http://hacks.mozilla.org/2009/06/rendering-svg-canvas-burst/">demonstrate taking SVG and having Burst load it</a> and convert it all to JavaScript objects that are rendered inside of a canvas. </p>
<p><img src="http://hacks.mozilla.org/wp-content/uploads/2009/06/burst-300x225.jpg"/></p>
<p>To get a feel for the code, view source:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-30');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-30">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Burst.<span style="color: #006600;">defaults</span>.<span style="color: #006600;">debug</span>=<span style="color: #003366; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Burst.<span style="color: #006600;">defaults</span>.<span style="color: #006600;">ease</span>=<span style="color: #3366CC;">"easeOutQuad"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Burst.<span style="color: #006600;">timeline</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"chassis"</span>, <span style="color:#800000;">0</span>, <span style="color:#800000;">100</span>, <span style="color:#800000;">1</span>, <span style="color: #003366; font-weight: bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; .<span style="color: #006600;">shape</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"car"</span>, <span style="color: #3366CC;">"car.svg"</span>, <span style="color: #3366CC;">"svg"</span>, <span style="color:#800000;">0</span>, <span style="color:#800000;">0</span>, <span style="color:#800000;">1</span>, <span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #006600;">cut</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"wheel1;wheel2"</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #006600;">group</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"chassis"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #006600;">track</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"top"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>,<span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">50</span>,-<span style="color:#800000;">20</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">70</span>,<span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Burst.<span style="color: #006600;">defaults</span>.<span style="color: #006600;">ease</span>=<span style="color: #3366CC;">"linear"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Burst.<span style="color: #006600;">timeline</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"wheels"</span>, <span style="color:#800000;">0</span>, <span style="color:#800000;">100</span>, <span style="color:#800000;">1</span>, <span style="color: #003366; font-weight: bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; .<span style="color: #006600;">shape</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"car"</span>, <span style="color: #3366CC;">"car.svg"</span>, <span style="color: #3366CC;">"svg"</span>, <span style="color:#800000;">0</span>, <span style="color:#800000;">0</span>, <span style="color:#800000;">1</span>, <span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #006600;">cut</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"chassis"</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #006600;">group</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"wheel1"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">track</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"centerX"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>,<span style="color:#800000;">230</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">track</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"centerY"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>,<span style="color:#800000;">350</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #006600;">track</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"rot"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>,<span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">100</span>,-<span style="color:#800000;">360</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #006600;">group</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"wheel2"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">track</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"centerX"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>,<span style="color:#800000;">430</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">track</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"centerY"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>,<span style="color:#800000;">350</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #006600;">track</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"rot"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>,<span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">100</span>,-<span style="color:#800000;">360</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Burst.<span style="color: #006600;">timeline</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"carObject"</span>, <span style="color:#800000;">0</span>, <span style="color:#800000;">300</span>, <span style="color:#800000;">3</span>, <span style="color: #003366; font-weight: bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; .<span style="color: #006600;">track</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"scl"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>,.<span style="color:#800000;">5</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; .<span style="color: #006600;">track</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"left"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>,<span style="color:#800000;">400</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">key</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">300</span>,-<span style="color:#800000;">195</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; .<span style="color: #006600;">inherit</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"wheels"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; .<span style="color: #006600;">inherit</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"chassis"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Burst.<span style="color: #006600;">timeline</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"boom"</span>, <span style="color:#800000;">0</span>, <span style="color:#800000;">10</span>, <span style="color:#800000;">1</span>, <span style="color: #003366; font-weight: bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; .<span style="color: #006600;">shape</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"boom"</span>, <span style="color: #3366CC;">"boom.svg"</span>, <span style="color: #3366CC;">"svg"</span>, <span style="color:#800000;">0</span>, <span style="color:#800000;">0</span>, <span style="color:#800000;">1</span>, <span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Burst.<span style="color: #006600;">start</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"carObject"</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Burst.<span style="color: #006600;">timeline</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"chassis"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">paused</span>=<span style="color: #003366; font-weight: bold;">true</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Burst.<span style="color: #006600;">timeline</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"wheels"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">paused</span>=<span style="color: #003366; font-weight: bold;">true</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Burst.<span style="color: #006600;">start</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"boom"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>and then watch the tutorial that shows how you can take Inkscape and quickly get animating.</p>
<p>View the <a href="http://videos.mozilla.org/serv/blizzard/35days/al-macdonald-svg-burst-canvas/Burst%20Engine%20-%20Tutorial%202%20-%20SVG%20Groups,%20Callbacks.ogv">Ogg</a> or <a href="http://videos.mozilla.org/serv/blizzard/35days/al-macdonald-svg-burst-canvas/Burst%20Engine%20-%20Tutorial%202%20-%20SVG%20Groups,%20Callbacks.mp4">mp4</a> versions.</p>
<p>Also check out the other items:</p>
<ul>
<li><a href="http://hacks.mozilla.org/2009/06/text-shadow/">stylish text with text-shadow</a>
</li>
<li><a href="http://hacks.mozilla.org/2009/06/add-ambiance-to-your-videos/">add some ambiance to your videos</a>
</li>
<li><a href="http://hacks.mozilla.org/2009/06/geolocation/">geolocation in Firefox 3.5</a>
</li>
<li><a href="http://hacks.mozilla.org/2009/06/content-aware-image-resizing/">content aware image resizing</a>
</li>
<li><a href="http://hacks.mozilla.org/2009/06/pushing-pixels-with-canvas/">Pushing pixels with Canvas</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/svgburst/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Styling buttons as links allowing you to POST away</title>
		<link>http://ajaxian.com/archives/styling-buttons-as-links-allowing-you-to-post-away</link>
		<comments>http://ajaxian.com/archives/styling-buttons-as-links-allowing-you-to-post-away#comments</comments>
		<pubDate>Wed, 10 Jun 2009 08:15:54 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6924</guid>
		<description><![CDATA[Have you ever wanted to just &#60;a href="path" action="post"&#62;? Remember the hub-ub with the old Google Web Accelerator and how it started to crawl links to delete actions that were mistakenly using GET?
Natalie Downe has written up a piece on styling HTML buttons as links which means that you can somewhat get the same effect. [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to just &lt;a href="path" action="post"&gt;? Remember the hub-ub with the old Google Web Accelerator and how it started to crawl links to delete actions that were mistakenly using GET?</p>
<p>Natalie Downe has written up a piece on <a href="http://natbat.net/2009/Jun/10/styling-buttons-as-links/">styling HTML buttons as links</a> which means that you can somewhat get the same effect. It shows how you can use an inline span to get the hover effect, taking:</p>
<div class="igBar"><a href="javascript:showCodeTxt('html-33');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">HTML:</span>
<div id="html-33">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/button.html"><span style="color: #000000; font-weight: bold;">&lt;button</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"submit"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"link"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">&lt;span&gt;</span></a></span>Hello there I am a button<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/button&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>and styling it with:</p>
<div class="igBar"><a href="javascript:showCodeTxt('css-34');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CSS:</span>
<div id="css-34">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">button <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">overflow</span>: <span style="color: #993333;">visible</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span>: <span style="color: #993333;">auto</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">button<span style="color: #6666ff;">.link </span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-family</span>: <span style="color: #ff0000;">"Verdana"</span> <span style="color: #993333;">sans-serif</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span>: 1em;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-align</span>: <span style="color: #000000; font-weight: bold;">left</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">color</span>: <span style="color: #000000; font-weight: bold;">blue</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span>: <span style="color: #993333;">none</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span>: <span style="color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span>: <span style="color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">border</span>: <span style="color: #993333;">none</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">cursor</span>: <span style="color: #993333;">pointer</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; -moz-user-select: <span style="color: #993333;">text</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/* override all your button styles here if there are any others */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">button<span style="color: #6666ff;">.link </span>span <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-decoration</span>: <span style="color: #993333;">underline</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">button.link<span style="color: #3333ff;">:hover </span>span,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">button.link<span style="color: #3333ff;">:focus </span>span <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">color</span>: <span style="color: #000000; font-weight: bold;">black</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>You can see the simple example <a href="http://natbat.net/code/clientside/css/buttons/">in action</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/styling-buttons-as-links-allowing-you-to-post-away/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Image thumbnail crop tool with Processing.js and PHP GD</title>
		<link>http://ajaxian.com/archives/image-thumbnail-tool-with-processing-and-php-gd</link>
		<comments>http://ajaxian.com/archives/image-thumbnail-tool-with-processing-and-php-gd#comments</comments>
		<pubDate>Thu, 04 Jun 2009 12:08:57 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6880</guid>
		<description><![CDATA[Matt Schoen has written a nice image thumbnail tool that lets you zoom in on the part of the image that you want to crop for a thumbnail.

You can check out the Processing code that does the work:
PLAIN TEXT
JAVASCRIPT:




&#160;


void setup&#40;&#41;&#123;


&#160; &#160; size&#40;600, 600&#41;;&#160; &#160; &#160;//for internal size variables


&#160; &#160; frameRate&#40;30&#41;;&#160; &#160; &#160; //set our draw [...]]]></description>
			<content:encoded><![CDATA[<p>Matt Schoen has written a nice <a href="http://www.pagefoundry.net/matt/jquery/imgcrop.php">image thumbnail tool</a> that lets you zoom in on the part of the image that you want to crop for a thumbnail.</p>
<p><img src="http://ajaxian.com/wp-content/uploads/imagecrop.png" alt="" title="imagecrop" width="500" height="500" class="alignnone size-full wp-image-6881" /></p>
<p>You can check out the Processing code that does the work:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-36');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-36">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">void</span> setup<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; size<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">600</span>, <span style="color:#800000;">600</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; &nbsp;<span style="color: #009900; font-style: italic;">//for internal size variables</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; frameRate<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">30</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//set our draw rate</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; stroke<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//all lines will be black</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; color c = color<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">128</span>,<span style="color:#800000;">128</span>,<span style="color:#800000;">128</span>,<span style="color:#800000;">128</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; fill<span style="color:#006600; font-weight:bold;">&#40;</span>c<span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//all filled rects will be 50% gray with 50% transparency</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">int xoffset = <span style="color:#800000;">0</span>;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//temp variable while we're dragging the mouse </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">int yoffset = <span style="color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">int xpos = <span style="color:#800000;">0</span>;&nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #009900; font-style: italic;">//where to draw the image</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">int ypos = <span style="color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">int startx, starty;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">int prsd = <span style="color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">PImage a;&nbsp; <span style="color: #009900; font-style: italic;">// Declare variable &quot;a&quot; of type PImage&nbsp; </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">a = loadImage<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"img.jpg"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color: #009900; font-style: italic;">// Load the images into the program </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">double s = <span style="color:#800000;">1</span>.<span style="color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">double r = <span style="color:#800000;">1</span>.<span style="color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">void</span> draw<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span>&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//this method is called by processingjs at the above frame rate</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; background<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; <span style="color: #009900; font-style: italic;">//draw a black background</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//for testing purposes, to figure out the scaling</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; scale<span style="color:#006600; font-weight:bold;">&#40;</span>s<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; image<span style="color:#006600; font-weight:bold;">&#40;</span>a, xpos - xoffset, ypos - yoffset<span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900; font-style: italic;">//draw scaled image</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; scale<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">1</span>/s<span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; &nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//for whatever reason, using &quot;scale(1.0);&quot; didn't reset the scale here.&nbsp; I have no idea why...</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//draw ghosting frame</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; noStroke<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; &nbsp;<span style="color: #009900; font-style: italic;">//we don't want borders on these rects</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; rect<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>,<span style="color:#800000;">0</span>,<span style="color:#800000;">600</span>,<span style="color:#800000;">100</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; rect<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>,<span style="color:#800000;">500</span>,<span style="color:#800000;">600</span>,<span style="color:#800000;">100</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; rect<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>,<span style="color:#800000;">100</span>,<span style="color:#800000;">100</span>,<span style="color:#800000;">400</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; rect<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">500</span>,<span style="color:#800000;">100</span>,<span style="color:#800000;">100</span>,<span style="color:#800000;">400</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; line<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>,<span style="color:#800000;">560</span>,<span style="color:#800000;">600</span>,<span style="color:#800000;">560</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">//draw the &quot;button&quot; regions</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; line<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">300</span>,<span style="color:#800000;">560</span>,<span style="color:#800000;">300</span>,<span style="color:#800000;">600</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; line<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">570</span>, <span style="color:#800000;">0</span>, <span style="color:#800000;">570</span>, <span style="color:#800000;">30</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; line<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">570</span>, <span style="color:#800000;">30</span>, <span style="color:#800000;">600</span>, <span style="color:#800000;">30</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">void</span> mousePressed<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>mouseY&gt; <span style="color:#800000;">560</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>mouseX&gt; <span style="color:#800000;">300</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s += .<span style="color:#800000;">1</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; s -= .<span style="color:#800000;">1</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>mouseY &lt;<span style="color:#800000;">30</span> &amp;&amp; mouseX&gt; <span style="color:#800000;">570</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; link<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"http://www.pagefoundry.net/matt/jquery/renderthumb.php?x="</span> + xpos + <span style="color: #3366CC;">"&amp;y="</span> + ypos + <span style="color: #3366CC;">"&amp;s="</span> + s<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; prsd = <span style="color:#800000;">1</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; startx = mouseX;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; starty = mouseY;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">void</span> mouseDragged<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>prsd&gt; <span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; xoffset = startx - mouseX;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; yoffset = starty - mouseY;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">void</span> mouseReleased<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; prsd = <span style="color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; xpos -= xoffset;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; ypos -= yoffset;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; xoffset = <span style="color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; yoffset = <span style="color:#800000;">0</span>;&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/image-thumbnail-tool-with-processing-and-php-gd/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>JSPlacemaker &#8211; Geo data extraction in pure JavaScript</title>
		<link>http://ajaxian.com/archives/jsplacemaker-geo-data-extraction-in-pure-javascript</link>
		<comments>http://ajaxian.com/archives/jsplacemaker-geo-data-extraction-in-pure-javascript#comments</comments>
		<pubDate>Fri, 22 May 2009 14:28:37 +0000</pubDate>
		<dc:creator>Chris Heilmann</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Geo]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[opentable]]></category>
		<category><![CDATA[placemaker]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[yql]]></category>
		<category><![CDATA[yqlexecute]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6840</guid>
		<description><![CDATA[Content extraction is still a hot topic on the web. We have lots of great text content but not much clue as to what those texts are. To make it more obvious we do term extraction for tagging but also geo location extraction for giving the text some spacial reference.
A fairly new web service that [...]]]></description>
			<content:encoded><![CDATA[<p>Content extraction is still a hot topic on the web. We have lots of great text content but not much clue as to what those texts are. To make it more obvious we do term extraction for tagging but also geo location extraction for giving the text some spacial reference.</p>
<p>A fairly new web service that does this for us is Yahoo's <a href="http://developer.yahoo.com/geo/placemaker/">Placemaker</a>. What it does is analyze a text (or the document defined by an HTML or feed URL) and give you back all the geographical locations that are mentioned in it. Pretty awesome, but the problem is that the API only allows for POST values and has either XML or RSS output. This means you can't do it in simple XHR because of the cross-domain problem and you can't use generated script nodes as there is no JSON output. You'd have to use a server-side proxy service. This is pretty easy with PHP and cURL <a href="http://developer.yahoo.net/blog/archives/2009/05/geolocating_web.html">as explained in this blog post</a> but can be annoying, too.</p>
<p>That's why I wrote a small wrapper in JavaScript that allows JS access to the Placemaker service called <a href="http://icant.co.uk/jsplacemaker/">JS-Placemaker</a>. I am not hosting a proxy for you, all you need to do is <a href="https://developer.yahoo.com/wsregapp/">get your own application ID for Placemaker</a> and use the JavaScript which you can host yourself if you wanted to.</p>
<p>Analyzing a text using JS-Placemaker is as easy as this:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-39');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-39">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">Placemaker.<span style="color: #006600;">config</span>.<span style="color: #006600;">appID</span>=<span style="color: #3366CC;">'YOUR-APP-ID'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">Placemaker.<span style="color: #006600;">getPlaces</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'Hi I am Chris, I live in London. Originally I am from Germany'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span>o<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;console.<span style="color: #006600;">log</span><span style="color:#006600; font-weight:bold;">&#40;</span>o<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #3366CC;">'en-uk'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>The console output is an object or an array of places the service returned from the text:</p>
<p><a href="http://www.flickr.com/photos/codepo8/3553188917/"><img src="http://farm3.static.flickr.com/2428/3553188917_1bdd6f2332.jpg" alt="JS-Placemaker - geolocate texts in JavaScript by you."/></a></p>
<p>The first parameter is the text you want to analyze (this could be a pointer to the innerHTML of a DOM element, for example), the second is the callback function and the third the locale of the text - the demo page shows that Placemaker groks several languages.</p>
<p>Under the hood, JS-Placemaker uses <a href="http://developer.yahoo.com/yql">YQL</a> to work around the issue of proxying the request. YQL allows you to define <a href="http://developer.yahoo.com/yql/guide/yql-opentables-chapter.html">your own data tables</a> and even allows for <a href="http://developer.yahoo.com/yql/guide/yql-execute-chapter.html">doing JavaScript conversion of data on the server-side</a> before sending it on. YQL has JSON output, so I was able to use that to access Placemaker in JavaScript. </p>
<p>The <a href="http://www.datatables.org/geo/geo.placemaker.xml">geo.placemaker</a> Open Table was built by Balaji Narayanan and Tom Hughes-Croucher and can be used in YQL directly. Say you want to get the geo location data from the Slashdot Homepage in JavaScript, you can do this with the following statement in YQL. </p>
<div class="igBar"><a href="javascript:showCodeTxt('code-40');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CODE:</span>
<div id="code-40">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">select * from geo.<span style="">placemaker</span> where documentURL=<span style="color:#CC0000;">"http://slashdot.org"</span> and documentType=<span style="color:#CC0000;">"text/html"</span> and appid=<span style="color:#CC0000;">"...the app id..."</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>You can choose JSON as the output <a href="http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.placemaker%20where%20documentURL%3D%22http%3A%2F%2Fslashdot.org%22%20and%20documentType%3D%22text%2Fhtml%22%20and%20appid%3D%22MPW7il7V34GiKxPB4hsGIzIN8Bw7tX3TTYy5hNJs7MTlCLHvA7xYYsGpB4InDmc-%22&#038;format=json&#038;env=http%3A%2F%2Fdatatables.org%2Falltables.env">and you get the data a a nice object.</a>. Define a callback method and you <a href="http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.placemaker%20where%20documentURL%3D%22http%3A%2F%2Fslashdot.org%22%20and%20documentType%3D%22text%2Fhtml%22%20and%20appid%3D%22MPW7il7V34GiKxPB4hsGIzIN8Bw7tX3TTYy5hNJs7MTlCLHvA7xYYsGpB4InDmc-%22&#038;format=json&#038;env=http%3A%2F%2Fdatatables.org%2Falltables.env&#038;callback=ajaxian">could use it directly in a script node</a>.</p>
<p>Have a <a href="http://developer.yahoo.com/yql/console/?q=select%20*%20from%20geo.placemaker%20where%20documentURL%3D%22http%3A%2F%2Fslashdot.org%22%20and%20documentType%3D%22text%2Fhtml%22%20and%20appid%3D%22MPW7il7V34GiKxPB4hsGIzIN8Bw7tX3TTYy5hNJs7MTlCLHvA7xYYsGpB4InDmc-%22&#038;env=http%3A%2F%2Fdatatables.org%2Falltables.env">Play with the YQL console using the Open Table</a>, but better get your own AppID, before this one exceeds the daily limits.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/jsplacemaker-geo-data-extraction-in-pure-javascript/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>YQL execute now allows you to convert scraped data with server side JavaScript</title>
		<link>http://ajaxian.com/archives/yql-execute-now-allows-you-to-convert-scraped-data-with-server-side-javascript</link>
		<comments>http://ajaxian.com/archives/yql-execute-now-allows-you-to-convert-scraped-data-with-server-side-javascript#comments</comments>
		<pubDate>Thu, 30 Apr 2009 14:28:37 +0000</pubDate>
		<dc:creator>Chris Heilmann</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[e4x]]></category>
		<category><![CDATA[execute]]></category>
		<category><![CDATA[serverside]]></category>
		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6735</guid>
		<description><![CDATA[I am a big fan of YQL, a terribly easy and fuss-free way to access APIs and mix data retrieved from them in a simple, SQL style language. Say for example you want photos of Paris,France from Flickr that are licensed with Creative Commons attribution, you can do this with a single command:
PLAIN TEXT
CODE:




select * [...]]]></description>
			<content:encoded><![CDATA[<p>I am a big fan of <a href="http://developer.yahoo.com/yql">YQL</a>, a terribly easy and fuss-free way to access APIs and mix data retrieved from them in a simple, SQL style language. Say for example you want photos of Paris,France from Flickr that are licensed with Creative Commons attribution, you can do this with a single command:</p>
<div class="igBar"><a href="javascript:showCodeTxt('code-44');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CODE:</span>
<div id="code-44">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">select * from flickr.<span style="">photos</span>.<span style="">info</span> where photo_id in <span style="color:#006600; font-weight:bold;">&#40;</span>select id from flickr.<span style="">photos</span>.<span style="">search</span> where woe_id in <span style="color:#006600; font-weight:bold;">&#40;</span>select woeid from geo.<span style="">places</span> where text=<span style="color:#CC0000;">'paris,france'</span><span style="color:#006600; font-weight:bold;">&#41;</span> and license=<span style="color:#800000;">4</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p><a href="https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20flickr.photos.info%20where%20photo_id%20in%20(select%20id%20from%20flickr.photos.search%20where%20woe_id%20in%20(select%20woeid%20from%20geo.places%20where%20text%3D'paris%2Cfrance')%20and%20license%3D4)&#038;format=xml">Try it out here</a> and you see what I mean.</p>
<p>The next step of this interface was to open it out to the public. You can define an "Open Table" as a <a href="http://developer.yahoo.com/yql/guide/yql-opentables-chapter.html">simple XML schema and bring your own API into this interface with that</a>.</p>
<p>One thing that's been burning on my tongue to tell the world about has been finally released now: YQL execute. Instead of making the YQL language itself much more complex (and thus running in circles) we now allow you to embed JavaScript in the Open Table XML that will run on the YQL server and allow you to access other web services, authenticate and scrape HTML with JavaScript and E4X. As <a href="http://simonwillison.net/2009/Apr/29/yql/">Simon Willison put it:</a></p>
<blockquote><p>This is nuts (in a good way). Yahoo!’s intriguing universal SQL-style XML/JSONP web service interface now supports JavaScript as a kind of stored procedure language, meaning you can use JavaScript and E4X to screen-scrape web pages, then query the results with YQL.</p></blockquote>
<p>Using this, you can augment the original functionality of YQL to whatever you need. For example, you can scrape HTML with YQL using XPATH, but there was no way to use CSS selectors. Using an open table that invokes <a href="http://james.padolsey.com/scripts/javascript/css2xpath.js/view">James Padolsey's css2xpath</a> JavaScript on the server side, this is now possible.</p>
<div class="igBar"><a href="javascript:showCodeTxt('code-45');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CODE:</span>
<div id="code-45">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">use <span style="color:#CC0000;">'http://yqlblog.net/samples/data.html.cssselect.xml'</span> as data.<span style="">html</span>.<span style="">cssselect</span>; select * from data.<span style="">html</span>.<span style="">cssselect</span> where url=<span style="color:#CC0000;">"www.yahoo.com"</span> and css=<span style="color:#CC0000;">"#news a"</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p><a href="http://query.yahooapis.com/v1/public/yql?q=use%20%27http%3A%2F%2Fyqlblog.net%2Fsamples%2Fdata.html.cssselect.xml%27%20as%20data.html.cssselect%3B%20select%20*%20from%20data.html.cssselect%20where%20url%3D%22www.yahoo.com%22%20and%20css%3D%22%23news%20a%22&#038;format=xml">Run this query in YQL</a></p>
<p>The data table is pretty easy:</p>
<div class="igBar"><a href="javascript:showCodeTxt('xml-46');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">XML:</span>
<div id="xml-46">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">"UTF-8"</span> ?<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;table</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">"http://query.yahooapis.com/v1/schema/table.xsd"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;meta<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;samplequery<span style="font-weight: bold; color: black;">&gt;</span></span></span>select * from {table} where url=&quot;www.yahoo.com&quot; and css=&quot;#news a&quot;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/samplequery<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/meta<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;bindings<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;select</span> <span style="color: #000066;">itemPath</span>=<span style="color: #ff0000;">""</span> <span style="color: #000066;">produces</span>=<span style="color: #ff0000;">"XML"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;urls<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;url<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/url<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/urls<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;inputs<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"url"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"xs:string"</span> <span style="color: #000066;">paramType</span>=<span style="color: #ff0000;">"variable"</span> <span style="color: #000066;">required</span>=<span style="color: #ff0000;">"true"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"css"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"xs:string"</span> <span style="color: #000066;">paramType</span>=<span style="color: #ff0000;">"variable"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/inputs<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;execute<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;//include css to xpath convert function</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;y.include(&quot;http://james.padolsey.com/scripts/javascript/css2xpath.js&quot;);</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;var query = null;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;if (css) {</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; var xpath = CSS2XPATH(css);</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; y.log(&quot;xpath &quot;+xpath);</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; query = y.query(&quot;select * from html where url=@url and xpath=\&quot;&quot;+xpath+&quot;\&quot;&quot;,{url:url});</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;} else {</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; query = y.query(&quot;select * from html where url=@url&quot;,{url:url});</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;}</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;response.object = query.results;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; ]]&gt;</span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/execute<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/select<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/bindings<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/table<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>Check the official <a href="http://developer.yahoo.net/blog/archives/2009/04/yql_execute.html">Yahoo Developer Network blog post on YQL execute</a> for more examples, including authentication examples for flickr and netflix.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/yql-execute-now-allows-you-to-convert-scraped-data-with-server-side-javascript/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Dynamic Content Injection with HTML5 Canvas and Video</title>
		<link>http://ajaxian.com/archives/dynamic-content-injection-with-html5-canvas-and-video</link>
		<comments>http://ajaxian.com/archives/dynamic-content-injection-with-html5-canvas-and-video#comments</comments>
		<pubDate>Wed, 22 Apr 2009 13:50:07 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Canvas]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6638</guid>
		<description><![CDATA[Paul Rouget and Tristan Nitot are having a lot of obvious fun with Canvas and &#60;video&#62; these days. The latest goodness is a demo by Paul that shows real-time dynamic content injection.

Notice the Firefox logo in between the two phones with bright screens? That is injected into the world thanks to Canvas.
How did Paul do [...]]]></description>
			<content:encoded><![CDATA[<p>Paul Rouget and Tristan Nitot are having a lot of obvious fun with Canvas and &lt;video&gt; these days. The latest goodness is a demo by Paul that shows <a href="http://blog.mozbox.org/post/2009/04/12/Firefox-35%3A-a-new-experiment-with-Canvas-Video">real-time dynamic content injection</a>.</p>
<p><img src="http://ajaxian.com/wp-content/uploads/contentinjection.png" alt="" title="contentinjection" width="500" height="270" class="alignnone size-full wp-image-6639" /></p>
<p>Notice the Firefox logo in between the two phones with bright screens? That is injected into the world thanks to Canvas.</p>
<p>How did Paul do this? He told us:</p>
<blockquote><p>
Obviously, I use the <a href="https://developer.mozilla.org/En/HTML/Element/Video">&lt;video/&gt;</a> tag.<br />
But what you see is not the video element (<em>display: none;</em>), but a<br />
<a href="https://developer.mozilla.org/En/HTML/Canvas">&lt;canvas/&gt;</a> tag.<br />
All the patterns you see on the top right are regular &lt;img/&gt;,<br />
&lt;video/&gt; and &lt;canvas/&gt; elements. The <em>play/pause</em> button is<br />
a <a href="https://developer.mozilla.org/En/SVG">&lt;svg/&gt;</a> element<br />
(<em>position: absolute;</em>) on the top of the main &lt;canvas/&gt; element.</p>
<p>A canvas element provides a method named <em>drawImage</em> which let you<br />
inject the content of a DOM element in the canvas (like a screenshot). It works<br />
with three kinds of elements: &lt;img/&gt;, &lt;canvas/&gt; and<br />
&lt;video/&gt;.</p>
<p>When you click on the &lt;svg/&gt; button, the Javascript code launches the<br />
main video. Then, the main javascript loop is executed each 10<br />
milliseconds.</p>
<p>Here are key things that occur during the main loop:</p>
<ul>
<li>first, the content of the video is injected in the main canvas. That's why<br />
the canvas element looks like a video element;</li>
<li>second, the position of the 2 brighter areas of the canvas are computed<br />
(you have access to all pixels values);</li>
<li>third, the required transformation is computed (rotation, scale,<br />
translation);</li>
<li>fourth, the content of the selected pattern is injected in the main canvas<br />
following the transformation.</li>
</ul>
<p>A little drawing:</p>
<p><img src="http://blog.mozbox.org/public/img/DCI.png" alt="DCI" title="DCI, Apr 2009"/></p>
</blockquote>
<p><a href="http://people.mozilla.com/~prouget/demos/DynamicContentInjection/play.xhtml">Check out the demo</a> in a bleeding edge Firefox browser, or <a href="http://standblog.org/blog/post/2009/04/15/Making-video-a-first-class-citizen-of-the-Web">watch the video</a>:</p>
<p><video src="http://people.mozilla.com/~prouget/videos/ogv/DCI.ogv" controls height="374" width="664px"><br />
    <object data="http://people.mozilla.com/~prouget/videos/flv/app/flvplayer.swf" type="application/x-shockwave-flash" width="664" height="374"><param value="http://people.mozilla.com/~prouget/videos/flv/app/flvplayer.swf" name="movie" /><param value="file=http://people.mozilla.com/~prouget/videos/flv/DCI.flv&amp;bufferlength=10&amp;autostart=false" name="FlashVars" /></object><br />
    </video></p>
<p>Crazy cool stuff :)</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/dynamic-content-injection-with-html5-canvas-and-video/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Auto Scrolling Parallax Effect in CSS</title>
		<link>http://ajaxian.com/archives/auto-scrolling-parallax-effect</link>
		<comments>http://ajaxian.com/archives/auto-scrolling-parallax-effect#comments</comments>
		<pubDate>Fri, 03 Apr 2009 06:01:25 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6483</guid>
		<description><![CDATA[
Paul Hayes is off doing more fun things, this time creating an auto scrolling parallax effect with CSS, specifically using multiple background images on a single element and the -webkit-transition property to provide the auto-scrolling.
All with a bit o' CSS:
PLAIN TEXT
CSS:




&#160;


#background &#123;


&#160; &#160; &#160; &#160; background: url&#40;'../images/foreground.png'&#41; 5% 5%,


&#160; &#160; &#160; &#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fofronline.com/experiments/parallax/#experiment"><img src="http://host.trivialbeing.org/up/fofrOnlineAutoScrollingParallax.jpg" border="0"/></a></p>
<p>Paul Hayes is off doing more fun things, this time <a href="http://www.fofronline.com/2009-04/auto-scrolling-parallax-effect-without-javascript/">creating an auto scrolling parallax effect with CSS</a>, specifically using multiple background images on a single element and the -webkit-transition property to provide the auto-scrolling.</p>
<p>All with a bit o' CSS:</p>
<div class="igBar"><a href="javascript:showCodeTxt('css-48');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CSS:</span>
<div id="css-48">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#background <span style="color:#006600; font-weight:bold;">&#123;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span>: <span style="color: #993333;">url</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">'../images/foreground.png'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#800000;">5</span>% <span style="color:#800000;">5</span>%,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">url</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">'../images/midground.png'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#800000;">20</span>% <span style="color:#800000;">20</span>%,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">url</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">'../images/background.png'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#800000;">90</span>% <span style="color:#800000;">110</span>%;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">top</span>: 218px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">left</span>: <span style="color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">right</span>: <span style="color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">bottom</span>: <span style="color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span>: <span style="color: #993333;">fixed</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; -webkit-transition: <span style="color: #000000; font-weight: bold;">left</span> 300s linear;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">#experiment<span style="color: #3333ff;">:target </span><span style="color: #cc00cc;">#background <span style="color:#006600; font-weight:bold;">&#123;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">left</span>: -5000px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">#experiment<span style="color: #3333ff;">:hover </span><span style="color: #cc00cc;">#background <span style="color:#006600; font-weight:bold;">&#123;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">left</span>: -9999px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/auto-scrolling-parallax-effect/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Creating a clock in CSS</title>
		<link>http://ajaxian.com/archives/creating-a-clock-in-css</link>
		<comments>http://ajaxian.com/archives/creating-a-clock-in-css#comments</comments>
		<pubDate>Thu, 26 Mar 2009 12:11:53 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6428</guid>
		<description><![CDATA[If you ever go to the BBC website you will see the working clock in the top right:

It thus seems appropriate that Paul Hayes of London has created an interesting experiment that shows how you can create an analogue clock using just CSS and JavaScript is only used to get the current time.

The real magic [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever go to the <a href="http://bbc.co.uk/">BBC</a> website you will see the working clock in the top right:</p>
<p><img src="http://ajaxian.com/wp-content/uploads/bbcclock.png" alt="" title="bbcclock" width="500" height="48" class="alignnone size-full wp-image-6429" /></p>
<p>It thus seems appropriate that Paul Hayes of London has created an interesting experiment that shows how you can <a href="http://www.fofronline.com/2009-03/an-analogue-clock-using-only-css/">create an analogue clock using just CSS</a> and JavaScript is only used to get the current time.</p>
<p><a href="http://www.fofronline.com/experiments/clock/#clock"><img src="http://ajaxian.com/wp-content/uploads/cssclock.png" alt="" title="cssclock" width="407" height="394" class="alignnone size-full wp-image-6430" /></a></p>
<p>The real magic is in CSS transitions such as:</p>
<div class="igBar"><a href="javascript:showCodeTxt('css-50');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CSS:</span>
<div id="css-50">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* -webkit-transition: property duration timing-function */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">#clock img<span style="color:#006600; font-weight:bold;">&#91;</span>src*=<span style="color: #ff0000;">'hour'</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">-webkit-transform: rotate<span style="color:#006600; font-weight:bold;">&#40;</span>90deg<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">#clock img<span style="color:#006600; font-weight:bold;">&#91;</span>src*=<span style="color: #ff0000;">'second'</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">-webkit-transition: -webkit-transform 60s linear;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">#clock<span style="color: #3333ff;">:target </span>img<span style="color:#006600; font-weight:bold;">&#91;</span>src*=<span style="color: #ff0000;">'second'</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">-webkit-transform: rotate<span style="color:#006600; font-weight:bold;">&#40;</span>360deg<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Nice work Paul!</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/creating-a-clock-in-css/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Vizeddit: Visualization of Reddit</title>
		<link>http://ajaxian.com/archives/vizeddit-visualization-of-reddit</link>
		<comments>http://ajaxian.com/archives/vizeddit-visualization-of-reddit#comments</comments>
		<pubDate>Thu, 19 Mar 2009 11:00:25 +0000</pubDate>
		<dc:creator>Ben Galbraith</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[MooTools]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6376</guid>
		<description><![CDATA[Yvo Schaap has created a reasonably interesting real-time front-end to Reddit data over at erqqvg.com. It's actually a really cool visualization of how Reddit's stories change over time, with "yellow-fade" indications when new comments and votes and registered. Super-nice.

(The screenshot doesn't do it justice; go check it out.)
But that's only half the story. They've got [...]]]></description>
			<content:encoded><![CDATA[<p>Yvo Schaap has created a reasonably interesting real-time front-end to Reddit data over at <a href="http://erqqvg.com/">erqqvg.com</a>. It's actually a really cool visualization of how Reddit's stories change over time, with "yellow-fade" indications when new comments and votes and registered. Super-nice.</p>
<p><img src="http://ajaxian.com/wp-content/uploads/whatthehellkindofnameiserqqvg.png" alt="" title="Erqqvg" width="470" height="231" class="alignnone size-full wp-image-6377" /></p>
<p>(The screenshot doesn't do it justice; go check it out.)</p>
<p>But that's only half the story. They've got a much-better-named service called "<a href="http://erqqvg.com/vizeddit/">Vizeddit</a>" that displays the same data with much richer graphics and animations:</p>
<p><img src="http://ajaxian.com/wp-content/uploads/vizeddit.png" alt="" title="Vizeddit" width="470" height="270" class="alignnone size-full wp-image-6378" /></p>
<p>Once again, you really need to go see it. The numbers along the bottom represent stories, and they grow and swap places over time, new ones are inserted, and so forth. You see the votes drop down in real-time, and new comments float in as well.</p>
<p>All brought to you with the <a href="http://mootools.net/">Moo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/vizeddit-visualization-of-reddit/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
