<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Webcam snapshots with Flex3</title>
	<atom:link href="http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/feed/" rel="self" type="application/rss+xml" />
	<link>http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/</link>
	<description>Alex' blog</description>
	<lastBuildDate>Mon, 30 Jan 2012 22:34:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: kay</title>
		<link>http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/comment-page-1/#comment-273466</link>
		<dc:creator>kay</dc:creator>
		<pubDate>Mon, 20 Jun 2011 01:38:10 +0000</pubDate>
		<guid isPermaLink="false">http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/#comment-273466</guid>
		<description>the download does not have the complete files in them....pls add them</description>
		<content:encoded><![CDATA[<p>the download does not have the complete files in them&#8230;.pls add them</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Albert</title>
		<link>http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/comment-page-1/#comment-96137</link>
		<dc:creator>Albert</dc:creator>
		<pubDate>Fri, 19 Feb 2010 02:20:51 +0000</pubDate>
		<guid isPermaLink="false">http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/#comment-96137</guid>
		<description>Here a update to cofigure easely the image size an quality...

as3 code:



  
     0) &amp;&amp; (commentField.text.length &gt; 0) &amp;&amp; 
          (imageViewer.getChildren().length &gt; 0)) {
            submit.enabled = true;  
			
          }
          else {
            submit.enabled = false;
			
          }
      }
      private function takeSnapshot():void {
        imageViewer.visible = true;
        imageViewer.width = preview.width;
        imageViewer.height = preview.height;
        var uiComponent : UIComponent = new UIComponent();
        uiComponent.width = webCam.width;
        uiComponent.height = webCam.height;
        var photoData:Bitmap = webCam.getSnapshot();
        var photoBitmap:BitmapData = photoData.bitmapData;
        uiComponent.addChild(photoData);
		uiComponent.scaleX = uiComponent.scaleY = scaleIt;
        imageViewer.removeAllChildren();
        imageViewer.addChild(uiComponent);
        state.text = &quot;&quot;;
        enableSubmit();
		deleteButton.enabled = true;
		
      }
      private function uploadSnapshot():void {
        if (imageViewer.getChildren().length &gt; 0) {
          var uic:UIComponent = imageViewer.getChildAt(0) as UIComponent;
          var bitmap:Bitmap = uic.getChildAt(0) as Bitmap;
          var jpgEncoder:JPEGEncoder = new JPEGEncoder(jpegQual);
          var jpgBytes:ByteArray = jpgEncoder.encode(bitmap.bitmapData);        
          state.text = &quot;starting upload ...&quot;;
          uploadPhoto(jpgBytes);
          
        }
      }
      private function deleteSnapshot():void {
        imageViewer.removeAllChildren();
        enableSubmit();
        state.text = &quot;&quot;;
      }
      private function uploadPhoto(imageData:ByteArray):void {
        var request:URLRequest = new URLRequest(&quot;./script/php/upload.php&quot;);
        var vars:URLVariables = new URLVariables();
        vars.name = nameField.text;
        vars.comment = commentField.text;
        vars.bindata = Base64.encodeByteArray(imageData);
        request.method = &quot;POST&quot;;       
        var loader:URLLoader = new URLLoader();               
        loader.addEventListener(Event.COMPLETE, uploadPhotoHandler);
        request.data = vars;
        loader.load(request);   
		
      }
      private function uploadPhotoHandler(event:Event):void {
        trace(&quot;server: &quot; + event.target.data);
        state.text = &quot;Thank you / Danke: &quot; + event.target.data;
      }
    ]]&gt;
  
  
  
  
  
  
  
  
  
  
  
  
  









PHP code:

&lt;?php
  if ($_REQUEST[&quot;bindata&quot;] === NULL) { 
    echo &quot;missing parameter.&quot;;
  }
  else {
    $img_data = base64_decode($_REQUEST[&quot;bindata&quot;]);
    $name = $_REQUEST[&quot;name&quot;] === NULL ? &quot;anonymous\n&quot; : $_REQUEST[&quot;name&quot;] .&quot;\n&quot;;
    $name = strip_tags($name);
    $comment = strip_tags($_REQUEST[&quot;comment&quot;]) . &quot;\n&quot;;
    $img_size = strlen($img_data);
    if ($img_size 




maybe u like it
greetings from Bonn, ger</description>
		<content:encoded><![CDATA[<p>Here a update to cofigure easely the image size an quality&#8230;</p>
<p>as3 code:</p>
<p>     0) &amp;&amp; (commentField.text.length &gt; 0) &amp;&amp;<br />
          (imageViewer.getChildren().length &gt; 0)) {<br />
            submit.enabled = true;  </p>
<p>          }<br />
          else {<br />
            submit.enabled = false;</p>
<p>          }<br />
      }<br />
      private function takeSnapshot():void {<br />
        imageViewer.visible = true;<br />
        imageViewer.width = preview.width;<br />
        imageViewer.height = preview.height;<br />
        var uiComponent : UIComponent = new UIComponent();<br />
        uiComponent.width = webCam.width;<br />
        uiComponent.height = webCam.height;<br />
        var photoData:Bitmap = webCam.getSnapshot();<br />
        var photoBitmap:BitmapData = photoData.bitmapData;<br />
        uiComponent.addChild(photoData);<br />
		uiComponent.scaleX = uiComponent.scaleY = scaleIt;<br />
        imageViewer.removeAllChildren();<br />
        imageViewer.addChild(uiComponent);<br />
        state.text = &#8220;&#8221;;<br />
        enableSubmit();<br />
		deleteButton.enabled = true;</p>
<p>      }<br />
      private function uploadSnapshot():void {<br />
        if (imageViewer.getChildren().length &gt; 0) {<br />
          var uic:UIComponent = imageViewer.getChildAt(0) as UIComponent;<br />
          var bitmap:Bitmap = uic.getChildAt(0) as Bitmap;<br />
          var jpgEncoder:JPEGEncoder = new JPEGEncoder(jpegQual);<br />
          var jpgBytes:ByteArray = jpgEncoder.encode(bitmap.bitmapData);<br />
          state.text = &#8220;starting upload &#8230;&#8221;;<br />
          uploadPhoto(jpgBytes);</p>
<p>        }<br />
      }<br />
      private function deleteSnapshot():void {<br />
        imageViewer.removeAllChildren();<br />
        enableSubmit();<br />
        state.text = &#8220;&#8221;;<br />
      }<br />
      private function uploadPhoto(imageData:ByteArray):void {<br />
        var request:URLRequest = new URLRequest(&#8220;./script/php/upload.php&#8221;);<br />
        var vars:URLVariables = new URLVariables();<br />
        vars.name = nameField.text;<br />
        vars.comment = commentField.text;<br />
        vars.bindata = Base64.encodeByteArray(imageData);<br />
        request.method = &#8220;POST&#8221;;<br />
        var loader:URLLoader = new URLLoader();<br />
        loader.addEventListener(Event.COMPLETE, uploadPhotoHandler);<br />
        request.data = vars;<br />
        loader.load(request);   </p>
<p>      }<br />
      private function uploadPhotoHandler(event:Event):void {<br />
        trace(&#8220;server: &#8221; + event.target.data);<br />
        state.text = &#8220;Thank you / Danke: &#8221; + event.target.data;<br />
      }<br />
    ]]&gt;</p>
<p>PHP code:</p>
<p>&lt;?php<br />
  if ($_REQUEST[&quot;bindata&quot;] === NULL) {<br />
    echo &quot;missing parameter.&quot;;<br />
  }<br />
  else {<br />
    $img_data = base64_decode($_REQUEST[&quot;bindata&quot;]);<br />
    $name = $_REQUEST[&quot;name&quot;] === NULL ? &quot;anonymous\n&quot; : $_REQUEST[&quot;name&quot;] .&quot;\n&quot;;<br />
    $name = strip_tags($name);<br />
    $comment = strip_tags($_REQUEST[&quot;comment&quot;]) . &quot;\n&quot;;<br />
    $img_size = strlen($img_data);<br />
    if ($img_size </p>
<p>maybe u like it<br />
greetings from Bonn, ger</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Taniguchi, J.T.</title>
		<link>http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/comment-page-1/#comment-94655</link>
		<dc:creator>Taniguchi, J.T.</dc:creator>
		<pubDate>Mon, 25 Jan 2010 20:14:48 +0000</pubDate>
		<guid isPermaLink="false">http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/#comment-94655</guid>
		<description>Thanks alot for posting this man, my stuff got going thanks to ya :)</description>
		<content:encoded><![CDATA[<p>Thanks alot for posting this man, my stuff got going thanks to ya <img src='http://tinkerlog.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hugo armando</title>
		<link>http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/comment-page-1/#comment-94057</link>
		<dc:creator>hugo armando</dc:creator>
		<pubDate>Wed, 13 Jan 2010 21:49:08 +0000</pubDate>
		<guid isPermaLink="false">http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/#comment-94057</guid>
		<description>hi!! 
nice job with the webcam but i still have a cuestion:
it apears that the webcam initialization obtains every installed twain source (screen capture driver, webcam, etc.) similar to a webcam. in my case it doesnt let me choose which one i want to use. i there a way to select a device from the source code or get a list to choose from?
tnks and keep the good work.</description>
		<content:encoded><![CDATA[<p>hi!!<br />
nice job with the webcam but i still have a cuestion:<br />
it apears that the webcam initialization obtains every installed twain source (screen capture driver, webcam, etc.) similar to a webcam. in my case it doesnt let me choose which one i want to use. i there a way to select a device from the source code or get a list to choose from?<br />
tnks and keep the good work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wensheng Wang</title>
		<link>http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/comment-page-1/#comment-88361</link>
		<dc:creator>Wensheng Wang</dc:creator>
		<pubDate>Wed, 28 Oct 2009 21:15:39 +0000</pubDate>
		<guid isPermaLink="false">http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/#comment-88361</guid>
		<description>Thank you for this, by far the most straight forward flex webcam solution.

I am using it for scan qrcode:
http://blog.wensheng.com/2009/10/poc-online-barcode-qrcode-scan-with.html</description>
		<content:encoded><![CDATA[<p>Thank you for this, by far the most straight forward flex webcam solution.</p>
<p>I am using it for scan qrcode:<br />
<a href="http://blog.wensheng.com/2009/10/poc-online-barcode-qrcode-scan-with.html" rel="nofollow">http://blog.wensheng.com/2009/10/poc-online-barcode-qrcode-scan-with.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toby Liddicoat</title>
		<link>http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/comment-page-1/#comment-85049</link>
		<dc:creator>Toby Liddicoat</dc:creator>
		<pubDate>Thu, 10 Sep 2009 10:26:31 +0000</pubDate>
		<guid isPermaLink="false">http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/#comment-85049</guid>
		<description>Actually, contrary to the main post remark of &quot;It works great, except that I was not able to transfer the image to the server, as I could not get hold of the data with php&quot; - you can!

I guess not many of you guys out there that PHP nuts like myself, but if you want to get a data piped into a PHP script just access it like so:



No need for hacking around with converting stuff to Base64, just take the original Adobe tutorial that posts to a Perl script and update your code to use &#039;php://input&#039; ... and if you want to throw name/value pairs, then append then to your URL in the querystring.</description>
		<content:encoded><![CDATA[<p>Actually, contrary to the main post remark of &#8220;It works great, except that I was not able to transfer the image to the server, as I could not get hold of the data with php&#8221; &#8211; you can!</p>
<p>I guess not many of you guys out there that PHP nuts like myself, but if you want to get a data piped into a PHP script just access it like so:</p>
<p>No need for hacking around with converting stuff to Base64, just take the original Adobe tutorial that posts to a Perl script and update your code to use &#8216;php://input&#8217; &#8230; and if you want to throw name/value pairs, then append then to your URL in the querystring.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Danish</title>
		<link>http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/comment-page-1/#comment-83284</link>
		<dc:creator>Danish</dc:creator>
		<pubDate>Thu, 13 Aug 2009 16:44:32 +0000</pubDate>
		<guid isPermaLink="false">http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/#comment-83284</guid>
		<description>hi,
how can i save image on local hard drive</description>
		<content:encoded><![CDATA[<p>hi,<br />
how can i save image on local hard drive</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How to save files from Flex to your server with PHP &#124; Arno Manders</title>
		<link>http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/comment-page-1/#comment-75012</link>
		<dc:creator>How to save files from Flex to your server with PHP &#124; Arno Manders</dc:creator>
		<pubDate>Fri, 24 Apr 2009 07:45:47 +0000</pubDate>
		<guid isPermaLink="false">http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/#comment-75012</guid>
		<description>[...] I found the solution at thinkerlog.com. I think it is the most straight forward solution. This are the [...]</description>
		<content:encoded><![CDATA[<p>[...] I found the solution at thinkerlog.com. I think it is the most straight forward solution. This are the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edit Profile &#171; LogField</title>
		<link>http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/comment-page-1/#comment-73611</link>
		<dc:creator>Edit Profile &#171; LogField</dc:creator>
		<pubDate>Thu, 16 Apr 2009 05:03:16 +0000</pubDate>
		<guid isPermaLink="false">http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/#comment-73611</guid>
		<description>[...] 8Â Webcam snapshots with Flex3 [...]</description>
		<content:encoded><![CDATA[<p>[...] 8Â Webcam snapshots with Flex3 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: webcam motion</title>
		<link>http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/comment-page-1/#comment-70262</link>
		<dc:creator>webcam motion</dc:creator>
		<pubDate>Thu, 02 Apr 2009 03:23:44 +0000</pubDate>
		<guid isPermaLink="false">http://tinkerlog.com/2007/11/03/webcam-snapshots-with-flex3/#comment-70262</guid>
		<description>Here is a list of motion detection resources resources for Flash developers, with sources, theory, samples, etc...  http://www.ugolog.com/pages/webcam-motion-detection-for-flash-flex-and-csharp</description>
		<content:encoded><![CDATA[<p>Here is a list of motion detection resources resources for Flash developers, with sources, theory, samples, etc&#8230;  <a href="http://www.ugolog.com/pages/webcam-motion-detection-for-flash-flex-and-csharp" rel="nofollow">http://www.ugolog.com/pages/webcam-motion-detection-for-flash-flex-and-csharp</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

