<?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>squidder.com &#187; labs</title>
	<atom:link href="http://www.squidder.com/category/labs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.squidder.com</link>
	<description>Actionscript you'll lose your ink over.</description>
	<lastBuildDate>Fri, 23 Apr 2010 17:29:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>FontSWFCreator: Create font swfs, get famous.</title>
		<link>http://www.squidder.com/2009/06/25/fontswfcreator-create-font-swfs-get-famous/</link>
		<comments>http://www.squidder.com/2009/06/25/fontswfcreator-create-font-swfs-get-famous/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 15:55:03 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[labs]]></category>
		<category><![CDATA[Unnecessarily short posts]]></category>

		<guid isPermaLink="false">http://www.squidder.com/?p=404</guid>
		<description><![CDATA[
Font embedding in flash can be a total drag, so we&#8217;ve been working on an OS X application to do all the heavy lifting in creating font swfs. And we just said a ton about it already on the FontSWFCreator page and we&#8217;re tired of  [witty remark] so just check out the full details here.
]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-407" title="walkoffame" src="http://www.squidder.com/wp-content/uploads/2009/06/walkoffame.jpg" alt="walkoffame" width="550" height="331" /></p>
<p>Font embedding in flash can be a total drag, so we&#8217;ve been working on an OS X application to do all the heavy lifting in creating font swfs. And we just said a ton about it already on the FontSWFCreator page and we&#8217;re tired of  [witty remark] so <a href="http://www.squidder.com/fontswfcreator/">just check out the full details here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squidder.com/2009/06/25/fontswfcreator-create-font-swfs-get-famous/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FLAR how-to: Multiple instances of multiple markers.</title>
		<link>http://www.squidder.com/2009/03/06/flar-how-to-multiple-instances-of-multiple-markers/</link>
		<comments>http://www.squidder.com/2009/03/06/flar-how-to-multiple-instances-of-multiple-markers/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 16:15:10 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[labs]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[augmented reality]]></category>
		<category><![CDATA[FLARToolkit]]></category>
		<category><![CDATA[Papervision]]></category>

		<guid isPermaLink="false">http://www.squidder.com/?p=285</guid>
		<description><![CDATA[
UPDATE: We&#8217;re be remiss not to also point you to Eric&#8217;s excellent FLARManager class. He took some of the stuff we&#8217;ve covered here and put a far more delicious topping on it.
One of the big things we&#8217;ve been wrasslin&#8217; with recently here at Squidder is how to handle multiple instances of multiple markers using FLARToolKit. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-286" title="kingofthetinycubes" src="http://www.squidder.com/wp-content/uploads/2009/03/kingofthetinycubes.jpg" alt="kingofthetinycubes" width="550" height="350" /></p>
<p><strong>UPDATE: </strong>We&#8217;re be remiss not to also point you to <a href="http://words.transmote.com/wp/">Eric&#8217;s excellent FLARManager class</a>. He took some of the stuff we&#8217;ve covered here and put a far more delicious topping on it.</p>
<p>One of the big things we&#8217;ve been wrasslin&#8217; with recently here at Squidder is how to handle multiple instances of multiple markers using FLARToolKit. Well we haven&#8217;t totally nailed it &#8212; close, but there are still a few niggling issues. So we&#8217;re looking to you, dear Squiddite, to help us out.</p>
<p>Before reading on, <a href="http://www.squidder.com/wp-content/uploads/2009/03/flarsquidderkit.zip">you can get our source code here</a>.</p>
<p>It contains all the libraries (FLARToolKit, Papervision, even some of our own) you need to get going, even if this your first FLAR project. It&#8217;s as simple as extending a single class, creating an array of the markers you want to load in, and rocking and rolling. It also works great even if you&#8217;re only dealing with a single symbol.</p>
<p>Read on for more thrilling details!</p>
<p><span id="more-285"></span></p>
<p>Anyway, what we&#8217;ve done is created our own version of FLARMultiMakerDetector that tries to maintain a consistent array of all the markers on the screen. So when a new marker is added, FLARSquidderMarkerDetector fires off a MARKER_ADDED event, which contains the id your marker (the order in which was loaded in &#8212; so the first marker has an id of 0) and the index (first marker on the screen, second, etc).  Conversely, when an object is removed, a MARKER_REMOVED event is fired. So this brings things a bit more in line with the type of event driven actionscript that we&#8217;re used to writing.</p>
<p>The problem that we haven&#8217;t quite gotten our brains around is how to make sure that we always have the correct index when multiple instances of the same marker is added. Here&#8217;s an example: You have three instances of Marker A on the screen. How do you know which one specifically is the one removed?</p>
<p>Currently, this isn&#8217;t a visible issue, since the other two markers will just &#8220;snap&#8221; instantly into place. But try tweening an object to its next location and you&#8217;ll see things start to flip flop between symbols.</p>
<p>Once again, <a href="http://www.squidder.com/wp-content/uploads/2009/03/flarsquidderkit.zip">feel free to grab our source code</a> and let us know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squidder.com/2009/03/06/flar-how-to-multiple-instances-of-multiple-markers/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>Augmented Reality Drum Kit</title>
		<link>http://www.squidder.com/2009/03/03/augmented-reality-drum-kit/</link>
		<comments>http://www.squidder.com/2009/03/03/augmented-reality-drum-kit/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 17:00:13 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[good ideas]]></category>
		<category><![CDATA[labs]]></category>
		<category><![CDATA[augmented reality]]></category>
		<category><![CDATA[FLARToolkit]]></category>
		<category><![CDATA[Papervision]]></category>

		<guid isPermaLink="false">http://www.squidder.com/?p=233</guid>
		<description><![CDATA[
This actually came about as a happy little accident while trying to bend FLARToolkit to our will (tracking multiple instances of multiple symbols &#8211; a total pain in the ass. But that&#8217;s a story for another time). It just so happened that we were rocking out to Kiss&#8217; &#8220;God Gave Rock &#38; Roll To You&#8221; and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-232" title="flardrums1" src="http://www.squidder.com/wp-content/uploads/2009/03/flardrums1.jpg" alt="flardrums1" width="550" height="350" /></p>
<p>This actually came about as a happy little accident while trying to bend <a href="http://saqoosha.net/en/flartoolkit/start-up-guide/">FLARToolkit</a> to our will (tracking multiple instances of multiple symbols &#8211; a total pain in the ass. But that&#8217;s a story for another time). It just so happened that we were rocking out to Kiss&#8217; &#8220;<a href="http://www.youtube.com/watch?v=IHBwryfycvk">God Gave Rock &amp; Roll To You</a>&#8221; and it suddenly occurred to us that &#8220;Hey, it wouldn&#8217;t be so hard to make these things make sounds when they disappear.&#8221; So we did. And it was awesome.</p>
<p><a href="http://www.squidder.com/flardrums/">We&#8217;ve (for once) posted a usable demo, so you too can rock out at your desk</a>. Below is a quick video demo of all four sounds and after the break, you can see the <a href="http://www.squidder.com/2009/03/03/augmented-reality-drum-kit/#more-233">demo of using multiple instances of the same drum</a>.</p>
<p><object width="550" height="410" data="http://vimeo.com/moogaloop.swf?clip_id=3455289&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=3455289&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /></object><br />
<span id="more-233"></span></p>
<p><object width="550" height="410" data="http://vimeo.com/moogaloop.swf?clip_id=3455380&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=3455380&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.squidder.com/2009/03/03/augmented-reality-drum-kit/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Real-time Face Detection in Flash</title>
		<link>http://www.squidder.com/2009/02/26/realtime-face-detection-in-flash/</link>
		<comments>http://www.squidder.com/2009/02/26/realtime-face-detection-in-flash/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 20:18:55 +0000</pubDate>
		<dc:creator>protozog</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[labs]]></category>
		<category><![CDATA[face]]></category>

		<guid isPermaLink="false">http://www.squidder.com/?p=198</guid>
		<description><![CDATA[
A couple of days ago we came across the AS3 library Marilena which is based off the Object Detection from the C library OpenCV. It&#8217;s an object detection library which is able to process an image and search for a particular type of object with a set of features. In this case it&#8217;s looking for [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-219" src="http://www.squidder.com/wp-content/uploads/2009/02/face.jpg" alt="face" width="550" height="322" /></p>
<p>A couple of days ago we came across the AS3 library <a href="http://www.libspark.org/svn/as3/Marilena/">Marilena</a> which is based off the Object Detection from the C library <a href="http://en.wikipedia.org/wiki/OpenCV">OpenCV</a>. It&#8217;s an object detection library which is able to process an image and search for a particular type of object with a set of features. In this case it&#8217;s looking for faces (was provided with the library). See more about how it works <a href="http://opencv.willowgarage.com/wiki/FaceDetection">here</a>.</p>
<p>The input images are driven from the webcam. We added confidence and motion monitoring for the purpose of &#8220;snapping&#8221; a photo.</p>
<p>Check out the video below or <a href="http://squidder.com/face/">try out the demo</a>.</p>
<p><strong>Update 3.3.09:</strong> We&#8217;ve gotten a few requests for code examples using this technology and who are we to say no? <a href="http://www.squidder.com/wp-content/uploads/2009/02/webcamfacedetector.zip">Grab the source here</a>.</p>
<p><object width="550" height="413" data="http://vimeo.com/moogaloop.swf?clip_id=3383559&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=3383559&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.squidder.com/2009/02/26/realtime-face-detection-in-flash/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Driving Demo, part 2</title>
		<link>http://www.squidder.com/2009/02/25/driving-demo-part-2/</link>
		<comments>http://www.squidder.com/2009/02/25/driving-demo-part-2/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 16:07:04 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[labs]]></category>
		<category><![CDATA[augmented reality]]></category>
		<category><![CDATA[FLARToolkit]]></category>
		<category><![CDATA[Papervision]]></category>

		<guid isPermaLink="false">http://www.squidder.com/?p=181</guid>
		<description><![CDATA[
We couldn&#8217;t help it. The XBOX Controller wasn&#8217;t enough. Had to hook it up to a wiimote too (big nod to the guys over at the WiiFlash project).
]]></description>
			<content:encoded><![CDATA[<p><object width="550" height="415" data="http://vimeo.com/moogaloop.swf?clip_id=3366078&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=3366078&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /></object></p>
<p>We couldn&#8217;t help it. <a href="http://www.squidder.com/2009/02/24/desktop-literal-driving-demo/">The XBOX Controller wasn&#8217;t enough</a>. Had to hook it up to a wiimote too (big nod to the guys over at the <a href="http://code.google.com/p/wiiflash/">WiiFlash project</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squidder.com/2009/02/25/driving-demo-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Desktop (literal) driving demo</title>
		<link>http://www.squidder.com/2009/02/24/desktop-literal-driving-demo/</link>
		<comments>http://www.squidder.com/2009/02/24/desktop-literal-driving-demo/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 17:10:30 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[labs]]></category>
		<category><![CDATA[augmented reality]]></category>
		<category><![CDATA[FLARToolkit]]></category>
		<category><![CDATA[Papervision]]></category>

		<guid isPermaLink="false">http://www.squidder.com/?p=159</guid>
		<description><![CDATA[
It&#8217;s no secret that we&#8217;re obsessed with augmented reality. Using this fantastic car demo whipped up by John Lindquist over at pv3d.org, we added in some FLARToolkit love to create a cool experience of driving the car around on a table.
But we didn&#8217;t stop there. Using the mind blowing-ly good ControllerMate and some simple keyboard [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-172" title="driving1" src="http://www.squidder.com/wp-content/uploads/2009/02/driving1.jpg" alt="driving1" width="550" height="325" /></p>
<p>It&#8217;s no secret that we&#8217;re <a href="http://www.squidder.com/2009/02/17/papertweet3d-augmented-reality-t-shirts/">obsessed with augmented reality</a>. Using this <a href="http://pv3d.org/2009/01/23/springcamera3d-and-driving-a-car/">fantastic car demo</a> whipped up by John Lindquist over at pv3d.org, we added in some <a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en">FLARToolkit</a> love to create a cool experience of driving the car around on a table.</p>
<p>But we didn&#8217;t stop there. Using the mind blowing-ly good <a href="http://www.orderedbytes.com/controllermate/">ControllerMate</a> and some simple keyboard mapping classes, we hooked the car up to a wired xbox 360 controller for maximum nerd. <span style="text-decoration: line-through;">Next step, get some shaders going on that sweet Ford Focus.</span> Ah, we couldn&#8217;t resist, so we added a shader.</p>
<p><strong>UPDATE: </strong>YouTube was being unhappy with our videos for some reason (we suspect it doesn&#8217;t get along with Snapz, but who knows), so we&#8217;re moving over to Vimeo. We&#8217;ve also updated our demo video here, too, to include a slight shadow under the car, as well as part where the car does it&#8217;s business without the flar symbol present. Enjoy!</p>
<p><object width="550" height="415"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=3364864&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=3364864&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="415"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.squidder.com/2009/02/24/desktop-literal-driving-demo/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>PaperTweet3d: Augmented Reality T-shirts</title>
		<link>http://www.squidder.com/2009/02/17/papertweet3d-augmented-reality-t-shirts/</link>
		<comments>http://www.squidder.com/2009/02/17/papertweet3d-augmented-reality-t-shirts/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 17:27:48 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[good ideas]]></category>
		<category><![CDATA[labs]]></category>
		<category><![CDATA[augmented reality]]></category>
		<category><![CDATA[FLARToolkit]]></category>
		<category><![CDATA[Papervision]]></category>

		<guid isPermaLink="false">http://www.squidder.com/?p=143</guid>
		<description><![CDATA[
So we here at squidder have been playing around with the FLARToolKit a lot recently. Pretty amazing stuff really. And while fooling around with it, something (perhaps obvious) occurred to us: We love flash. And we also love t-shirts. And Papervision. And Twitter.
And, suddenly, we had a way to combine them all together.
Below is an early technical [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.squidder.com/wp-content/uploads/2009/02/eshirt2.jpg" alt="eshirt2" title="eshirt2" width="550" height="334" class="alignnone size-full wp-image-196" /></p>
<p>So we here at squidder have been playing around with the <a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en" target="_blank">FLARToolKit</a> a lot recently. Pretty amazing stuff really. And while fooling around with it, something (perhaps obvious) occurred to us: We love flash. And we also love t-shirts. And Papervision. And Twitter.</p>
<p>And, suddenly, we had a way to combine them all together.</p>
<p>Below is an early technical demo, in which a barcode, containing a twitter username, is embedded within our FLAR pattern. This is important because you don&#8217;t need to create a new pattern for each username. Instead, the flash reads the person&#8217;s username (up to 8 characters, encoded in 6 bit chunks) and then pulls that person&#8217;s latest post from twitter. </p>
<p>The source code is a mess, but we&#8217;ll be posting some more how-to details soon. In the meantime, enjoy the video demo below!</p>
<p><strong>Update:</strong> YouTube drools, Vimeo rules.</p>
<p><object width="550" height="415"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=3364975&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=3364975&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="415"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.squidder.com/2009/02/17/papertweet3d-augmented-reality-t-shirts/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Apple-like reflection using Pixel Bender</title>
		<link>http://www.squidder.com/2008/12/02/apple-like-reflection-using-pixel-bender/</link>
		<comments>http://www.squidder.com/2008/12/02/apple-like-reflection-using-pixel-bender/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 18:38:43 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[labs]]></category>

		<guid isPermaLink="false">http://www.squidder.com/?p=96</guid>
		<description><![CDATA[
Update: Fixed a minor bug when dealing with transparent sources.
Everyone loves pixel bender and everyone loves those apple-like reflections. So why not combine them? That&#8217;s why we&#8217;ve gone ahead and created a very simple pixel bender filter for creating just this effect, even on video (and it looks especially good on video).
Source code and download [...]]]></description>
			<content:encoded><![CDATA[<p><img class="mt-image-none" src="http://www.squidder.com/old/2008/12/02/pixelbender.jpg" alt="pixelbender.jpg" width="450" height="332" /></p>
<p>Update: Fixed a minor bug when dealing with transparent sources.</p>
<p>Everyone loves pixel bender and everyone loves those apple-like reflections. So why not combine them? That&#8217;s why we&#8217;ve gone ahead and created a very simple pixel bender filter for creating just this effect, even on video (and it looks especially good on video).</p>
<p>Source code and download after the jump.</p>
<p><span id="more-96"></span></p>
<p>Here is the pbk source code for the filter:<br />
<code><br />
kernel ReflectionFilter<br />
&lt;<br />
   namespace : "com.squidder";<br />
   vendor : "Jon Reiling / Squidder.com";<br />
   version : 1;<br />
   description : "Filter for creating an apple-like reflection.";<br />
&gt;<br />
{<br />
   input image4 src;<br />
   output pixel4 dst;</p>
<p>   parameter float imageheight<br />
   &lt;<br />
      minValue: 0.0;<br />
      maxValue : 1000.0;<br />
      defaultValue : 300.0;<br />
   &gt;<br />
   <br />
   parameter float fadeheight<br />
   &lt;<br />
      minValue : 0.0;<br />
      maxValue: 1000.0;<br />
      defaultValue: 100.0;<br />
   &gt;<br />
   <br />
   parameter float fadealpha<br />
   &lt;<br />
      minValue : 0.0;<br />
      maxValue : 1.0;<br />
      defaultValue : 0.5;<br />
   &gt;<br />
   <br />
   void evaluatePixel()<br />
   {<br />
      float2 coord = outCoord();</p>
<p>      if ( coord[ 1 ] &lt; imageheight ) {<br />
         dst = sampleNearest(src, coord );<br />
      } else {<br />
         float alpha = 1.0 - ( coord[ 1 ] - imageheight ) / fadeheight;<br />
         coord[ 1 ] = imageheight - ( coord[ 1 ] - imageheight );<br />
         dst = sampleNearest( src, coord );<br />
         alpha *= fadealpha;<br />
         dst.a *= alpha;<br />
         dst.r *= alpha;<br />
         dst.b *= alpha;<br />
         dst.g *= alpha;<br />
      }<br />
   }<br />
}<br />
</code></p>
<p> <br />
As you may be able to tell, there are two unfortunate aspects to this filter. The first is that you have to manually pass in the height of the image. I have yet to figure out how to get the overall height of the image being passed in &#8212; if anyone knows, please hit us up in the comments!</p>
<p>Secondly, if you try this out, you&#8217;ll see that the reflection actually overwrites the bottom part of the source image. This is because, as far as I can tell, you can&#8217;t add height to your output. So to counter this, you&#8217;ll need to artificially add height to your target clip. You can do this easily by adding a transparent shape the height of your reflection. Again, if you have any notions on this, please drop a comment.</p>
<p>Finally, here is the flash code to read in and apply the filter:</p>
<p><code><br />
var reflectionHeight : int = 50;</p>
<p>var urlLoader : URLLoader = new URLLoader();<br />
urlLoader.dataFormat = URLLoaderDataFormat.BINARY;<br />
urlLoader.addEventListener( Event.COMPLETE , _applyFilter );<br />
urlLoader.load( new URLRequest( "ReflectionFilter.pbj" ) );</p>
<p>function _applyFilter( event : Event ) : void {</p>
<p>   var shader:Shader = new Shader( URLLoader( event.target ).data );<br />
   shader.data.imageheight.value = [ target.height - reflectionHeight ];<br />
   shader.data.fadeheight.value = [ reflectionHeight ];<br />
   shader.data.fadealpha.value = [ 0.4 ];</p>
<p>   var filter : ShaderFilter = new ShaderFilter( shader );<br />
   target.filters = [ filter ];<br />
}<br />
</code><br />
<a href="http://squidder.com/old/2008/12/02/ReflectionFilter.zip">Download the source files</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squidder.com/2008/12/02/apple-like-reflection-using-pixel-bender/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bumblebee: From Excel to xml.</title>
		<link>http://www.squidder.com/2008/11/14/bumblebee-the-easiest-path-from-excel-to-xml/</link>
		<comments>http://www.squidder.com/2008/11/14/bumblebee-the-easiest-path-from-excel-to-xml/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 00:57:12 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[labs]]></category>

		<guid isPermaLink="false">http://www.squidder.com/?p=95</guid>
		<description><![CDATA[
Whew! It&#8217;s been a busy few months for your friends over at squidder. But to make up for the fact that we have been totally	delinquent	bloggers, we bring you Bumblebee.
What is Bumblebee, you ask? It&#8217;s a program born out of many many projects where the client has sent us excel documents and we&#8217;ve had to either [...]]]></description>
			<content:encoded><![CDATA[<div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://bumblebee.squidder.com/"><img class="mt-image-none" src="http://www.squidder.com/old/2008/11/14/bumblebee.jpg" alt="bumblebee.jpg" width="500" height="333" /></a></span></div>
<p>Whew! It&#8217;s been a busy few months for your friends over at squidder. But to make up for the fact that we have been totally	delinquent	bloggers, we bring you <a href="http://bumblebee.squidder.com/">Bumblebee</a>.</p>
<p>What is Bumblebee, you ask? It&#8217;s a program born out of many many projects where the client has sent us excel documents and we&#8217;ve had to either move it to xml by hand or try to wrap our heads around the excel xml mapping scheme (spoiler: it sucks).</p>
<p>So we went ahead and wrote our own mapping program that uses simple templates to map values from an excel xml file to your own xml file.</p>
<p>We&#8217;ve love to hear if it helped you at out or if you have any suggestions, bugs or feature requests for future versions. Hit us up at bumblebee at squidder dawt com.</p>
<p>Enjoy responsibly!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squidder.com/2008/11/14/bumblebee-the-easiest-path-from-excel-to-xml/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SWFAddress plus mod_rewrite = SEO bliss</title>
		<link>http://www.squidder.com/2008/05/01/swfaddress-plus-mod_rewrite-seo-bliss/</link>
		<comments>http://www.squidder.com/2008/05/01/swfaddress-plus-mod_rewrite-seo-bliss/#comments</comments>
		<pubDate>Thu, 01 May 2008 22:45:45 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[good ideas]]></category>
		<category><![CDATA[labs]]></category>

		<guid isPermaLink="false">http://www.squidder.com/?p=87</guid>
		<description><![CDATA[
We at squidder often talk about the best way to bring SEO and accessibility to our flash work. And in many ways, the work is simple when you add in fancy tools like SWFObject &#8212; just spit out the content you want to appear to a search engine in the div that gets overwritten!
But what [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.squidder.com/old/2008/05/01/seo.jpg" alt="seo.jpg" width="450" height="417" /></p>
<p>We at squidder often talk about the best way to bring SEO and accessibility to our flash work. And in many ways, the work is simple when you add in fancy tools like SWFObject &#8212; just spit out the content you want to appear to a search engine in the div that gets overwritten!</p>
<p>But what if you&#8217;ve got an extremely complex site, with many sections, pages and drill downs that you want to make accessible? One option is to simply spit out all the content, no matter how long, into that same div. Yes, that will get indexed by search engines, but not only does it make the page you&#8217;re loading very large, it also doesn&#8217;t link users directly to the content they searched for.</p>
<p>That&#8217;s where SWFAddress and mod_rewrite come in. Full deets after the jump.</p>
<p><span id="more-87"></span></p>
<p><strong>Let&#8217;s look at our tools:</strong></p>
<p><a href="http://www.asual.com/swfaddress/" target="_blank">SWFAddress</a>, as you may know, is an OUTRAGEOUSLY awesome javascript tool that works in tandem with SWFObject to allow for deep linking and use of the back/forward buttons in the browser.</p>
<p><a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html" target="_blank">mod_rewrite</a> is an apache module that basically lets you parse out elements of a url as variables instead of the folder structure that they appear to be.</p>
<p>So let&#8217;s put them together.</p>
<p>Let&#8217;s say you&#8217;ve got a flash application set up for selling music. There is conceivably a huge amount of information that you would want to make available to search engines, but there&#8217;s no way you could output all the information on one page.</p>
<p>Instead, you set up a &#8220;fake&#8221; directory structure using mod_rewrite that might look like this:</p>
<p><code>yourmusicapp.com/alternative/wolf_parade/apologies_to_the_queen_mary/</code></p>
<p>So everything after the first &#8220;/&#8221; is parsed and used to return an html page with the track listing and album info for Wolf Parade&#8217;s album &#8220;Apologies To The Queen Mary&#8221;.</p>
<p>Similarly, if you went to &#8220;/alternative/work_parade/&#8221;, you would get html of links to all of Wolf Parade&#8217;s albums and a description for the band. Go futher down to just &#8220;/alternative/&#8221; and you&#8217;d get links to all the alternative artists and if you just went to &#8220;/&#8221; you&#8217;d get a links to all the genres.</p>
<p>So now we&#8217;ve set up a structure that can easily be indexed. But now how does that allow us to get into the flash?</p>
<p>If we call the above links &#8220;hard urls&#8221;, then &#8220;soft urls&#8221; would be urls that you pass into SWFAddress for deep linking &#8212; basically anything that occurs after the &#8220;#&#8221;. So the soft url of the example above would be:</p>
<p><code>yourmusicapp.com/#/alternative/wolf_parade/apologies_to_the_queen_mary/</code></p>
<p>The flash is then set up as such that when it receives the value above from SWFAddress that it automatically goes to the album view for &#8220;Apologies To The Queen Mary&#8221;.</p>
<p>Now the final step: using javascript, you can automatically forward users with flash who are led to the &#8220;hard urls&#8221; to the the &#8220;soft urls&#8221;. So someone who searches for &#8220;Wolf Parade&#8221; in google would get back:</p>
<p><code>yourmusicapp.com/aternative/wolf_parade/</code></p>
<p>If the viewer is a search engine, they&#8217;ll be stopped here and just index the information about wolf parade. But if its a viewer with flash installed, they&#8217;ll be seamlessly redirected to the flash application:</p>
<p><code>yourmusicapp.com/#/alternative/wolf_parade/</code></p>
<p><strong>Conclusion</strong></p>
<p>Our next step is to get a public example of this for people to take a gander through. SEO solutions of this caliber for flash are great for both developers and agencies as it lets us alleviate some fears that clients may put up to going with flash. It&#8217;s not for every project &#8212; you&#8217;ll probably need control of the back end development as well as the front end &#8212; but when you find the right one, you&#8217;ll know it.</p>
<p>Also, keep in mind that you don&#8217;t actually need mod_rewrite to pursue a solution like this &#8211; you could generate the hard urls as actual html files instead of generating them on the fly, which, if your music store was getting a ton of traffic, might be a better plan anyway. The important thing is coming up with a url structure that is mirrored in the both the hard urls and the soft urls.</p>
<p>Finally: if you haven&#8217;t heard &#8220;Apologies To The Queen Mary&#8221;, do yourself a favor and get it. I&#8217;m not going to say that if you listen to it backwards while reading this post, you&#8217;ll find a super secret message&#8230; but you never know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squidder.com/2008/05/01/swfaddress-plus-mod_rewrite-seo-bliss/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
