<?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; trick</title>
	<atom:link href="http://www.squidder.com/tag/trick/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>
	</channel>
</rss>
