<?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>rainbowlazer &#187; Actionscript 3</title>
	<atom:link href="http://rainbowlazer.com/category/application-scripting/actionscript-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://rainbowlazer.com</link>
	<description>art, design &#38; new media technotes</description>
	<lastBuildDate>Fri, 02 Jul 2010 18:10:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Multiple Webcams in Flash with Actionscript 3</title>
		<link>http://rainbowlazer.com/scripting-programming/multiple-webcams-in-flash-with-actionscript-3/</link>
		<comments>http://rainbowlazer.com/scripting-programming/multiple-webcams-in-flash-with-actionscript-3/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 22:57:13 +0000</pubDate>
		<dc:creator>Chris Reilly</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Scripting & Programming]]></category>

		<guid isPermaLink="false">http://rainbowlazer.com/?p=231</guid>
		<description><![CDATA[
It&#8217;s true! You can have multiple webcam feeds in your swf/as3 application. Here&#8217;s how:

Plug in your webcams.
Look in your Flash Player&#8217;s Camera Settings Panel. You might have to open an existing swf to get here. You should see a dropdown list of all the cameras available to you. The first camera on the list is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rainbowlazer.com/wp-content/uploads/2009/06/picture-37.png" rel="shadowbox[post-231];player=img;"><img class="aligncenter size-medium wp-image-240" title="picture-37" src="http://rainbowlazer.com/wp-content/uploads/2009/06/picture-37-300x226.png" alt="picture-37" width="300" height="226" /></a></p>
<p>It&#8217;s true! You can have multiple webcam feeds in your swf/as3 application. Here&#8217;s how:</p>
<ol>
<li>Plug in your webcams.</li>
<li>Look in your <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/help04.html#117113" target="_blank">Flash Player&#8217;s Camera Settings Panel</a>. You might have to open an existing swf to get here. You should see a dropdown list of all the cameras available to you. The first camera on the list is camera 0, the second is camera 1, and so on. Remember the numbers of the cameras you want to work with (In my case, I want #7 and #8).<br />
<a href="http://rainbowlazer.com/wp-content/uploads/2009/06/picture-36.png" rel="shadowbox[post-231];player=img;"><img class="aligncenter size-full wp-image-236" style="margin-top: 25px; margin-bottom: 25px;" title="Flash Player's Camera Settings" src="http://rainbowlazer.com/wp-content/uploads/2009/06/picture-36.png" alt="Flash Player's Camera Settings" width="226" height="211" /></a></li>
<li>Call your cameras with Actionscript 3. Here&#8217;s the <a href="http://rainbowlazer.com/wp-content/uploads/2009/06/multi_cam_test.as" target="_blank">code</a>, and here&#8217;s a <a href="http://rainbowlazer.com/wp-content/uploads/2009/06/multi_cam_test.zip" target="_blank">FLEX project</a>.<a href="http://rainbowlazer.com/wp-content/uploads/2009/06/picture-35.png" rel="shadowbox[post-231];player=img;"><img class="aligncenter size-full wp-image-235" style="border: 1px solid black; margin-top: 25px; margin-bottom: 25px;" title="The Actionscript 3 Code" src="http://rainbowlazer.com/wp-content/uploads/2009/06/picture-35.png" alt="The Actionscript 3 Code" width="518" height="471" /></a></li>
<li>A few pointers: be careful about plugging/unplugging the cameras. Flash Player seems not to like this, you may have to quit and restart to refresh the list. You can adjust how and where both video feeds are placed in the scene. In this example they&#8217;re layered on top of each other with the blend mode set to OVERLAY, which [sort of] averages the two feeds together.</li>
<li>Only see one camera? Depending on your camera &amp; drivers, your computer may not recognize two identical cameras at the same time. Cameras with different hardware should be recognized, though.</li>
</ol>
<p>Also, I am using <a href="http://www.amazon.com/PlayStation-3-Eye/dp/B000VTQ3LU" target="_blank">Playstation 3 Eye</a> cameras, because they are great in low light and have high frame rates, and are pretty cheap. You can get drivers for <a href="http://alexpopovich.wordpress.com/2008/10/02/sony-ps3eye-camera-directshow-capture-source-filter/" target="_blank">Windows</a> and <a href="http://webcam-osx.sourceforge.net/downloads.html" target="_blank">Mac</a> since they are not recognized automatically. Have fun!</p>
<p style="text-align: center;">
<p><script type="text/javascript"><!--
google_ad_client = "pub-9738136468704557";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0066cc";
google_color_text = "000000";
google_color_url = "008000";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://rainbowlazer.com/scripting-programming/multiple-webcams-in-flash-with-actionscript-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
