<?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; source code</title>
	<atom:link href="http://www.squidder.com/category/source-code/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>Trick: Auto-select mac iSight in flash.</title>
		<link>http://www.squidder.com/2009/03/09/trick-auto-select-mac-isight-in-flash/</link>
		<comments>http://www.squidder.com/2009/03/09/trick-auto-select-mac-isight-in-flash/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 13:55:41 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[source code]]></category>
		<category><![CDATA[augmented reality]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://www.squidder.com/?p=307</guid>
		<description><![CDATA[If you&#8217;ve been messing around with Augmented Reality (or any webcam stuff in flash for that matter), you may have come to the realization that many mac users may not have their proper webcams (i.e. iSights) set by default. In a commercial setting, you want to avoid a person having to select their webcam at [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve been messing around with Augmented Reality (or any webcam stuff in flash for that matter), you may have come to the realization that many mac users may not have their proper webcams (i.e. iSights) set by default. In a commercial setting, you want to avoid a person having to select their webcam at almost all costs &#8212; it&#8217;s another barrier to entry, and can be confusing, too. Especially if you have video editing software installed, there can be a lot of options, as you can see below.</p>
<p><img class="alignnone size-full wp-image-308" style="margin-top: 5px; margin-bottom: 5px;" title="camerasettings" src="http://www.squidder.com/wp-content/uploads/2009/03/camerasettings.gif" alt="camerasettings" width="213" height="149" /></p>
<p>However, it&#8217;s easy to check and see if the person has an iSight installed and, if so, automatically choose that one.</p>
<p><code>var index : int = 0;</code></p>
<p><code>for ( var i : int = 0 ; i &lt; Camera.names.length ; i++ ) {</code></p>
<p><code><span> </span></p>
<p style="padding-left: 30px;"><span> </span>if ( Camera.names[ i ] == "USB Video Class Video" ) {</p>
<p style="padding-left: 60px;"><span> </span>index = i;</p>
<p style="padding-left: 30px;"><span> </span>}</p>
<p>}</p>
<p>//Oddly, Camera.getCamera needs a string of the camera index, NOT the name of the camera.</p>
<p></code></p>
<p><code>_webcam = Camera.getCamera( String( index ) );</code></p>
<p>Voilà. You&#8217;re now covered for mac users and windows users won&#8217;t notice a thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squidder.com/2009/03/09/trick-auto-select-mac-isight-in-flash/feed/</wfw:commentRss>
		<slash:comments>3</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>
	</channel>
</rss>
