<?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>Miti&#039;s Blog &#187; Flash Player 10</title>
	<atom:link href="http://miti.pricope.com/category/flash-player-10/feed/" rel="self" type="application/rss+xml" />
	<link>http://miti.pricope.com</link>
	<description>about technology</description>
	<lastBuildDate>Sat, 06 Feb 2010 10:08:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>The infamous Error #2044: Unhandled StatusEvent:. level=error, code= on LocalConnection</title>
		<link>http://miti.pricope.com/2009/07/24/the-infamous-error-2044-unhandled-statusevent-levelerror-code-on-localconnection/</link>
		<comments>http://miti.pricope.com/2009/07/24/the-infamous-error-2044-unhandled-statusevent-levelerror-code-on-localconnection/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 08:27:36 +0000</pubDate>
		<dc:creator>mpricope</dc:creator>
				<category><![CDATA[Flash Player 10]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[tips & tricks]]></category>

		<guid isPermaLink="false">http://miti.pricope.com/?p=176</guid>
		<description><![CDATA[This is a blog post to all that was almost to throw their computers out of the window because they got &#34;Error #2044: Unhandled StatusEvent:. level=error, code=&#34; trying to communicate through LocalConnection. So I am trying to send a message from a Flex application running in Flash Player to an AIR application. In the AIR [...]]]></description>
			<content:encoded><![CDATA[<p>This is a blog post to all that was almost to throw their computers out of the window because they got &quot;Error #2044: Unhandled StatusEvent:. level=error, code=&quot; trying to communicate through LocalConnection.</p>
<p>So I am trying to send a message from a Flex application running in Flash Player to an AIR application. In the AIR application (called testAIR) I have something like:</p>
<p><pre class="brush: as3;">
private function initApp():void {
	var inbound:LocalConnection = new LocalConnection();
	//only allow connections from localhost
	inbound.allowDomain(&quot;localhost&quot;);
	inbound.client = new Object();
	//this is the function that will be called by the Browser App
	inbound.client.notifyPayment = function test():void {
		Alert.show(&quot;HERE&quot;);
	};
	inbound.connect(&quot;paymentSample&quot;);
}
</pre>
</p>
<p>pretty straightforward, right from the book.</p>
<p>In the Flex app I just do:</p>
<p><pre class="brush: as3;">
outbound.connect(&quot;paymentSample&quot;);
outbound.send(&quot;app#testAIR:paymentSample&quot;,&quot;notifyPayment&quot;);
outbound.close();
</pre>
</p>
<p>You might think that this should work. Well &#8230; NOT.&#160; This is because in the AIR app the inbound LocalConnection is a variable that is declared in the local scope of a method. Now I was expecting that when I call&#160; the connect method the inbound object will be referenced by another object (some LocalConnection manager, or event handler) and it will not get garbage collected after the method ends. Well, apparently is not the case. Either there is a bug in AIR, either this reference is a weak reference so it gets garbage collected. This means that by the time you try to send the message from Flash Player your inbound object is long gone!</p>
<p>The resolution is quite simple. You just need to reference the inbound object somewhere else, making him a member of class or something. In my case I just declare it as a private variable inside my MXML component:</p>
<p><pre class="brush: as3;">
private var inbound:LocalConnection = new LocalConnection();

private function initApp():void {
	//only allow connections from localhost
	inbound.allowDomain(&quot;localhost&quot;);
       ....
</pre>
</p>
<p>Hope this will help someone <img src='http://miti.pricope.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://miti.pricope.com/2009/07/24/the-infamous-error-2044-unhandled-statusevent-levelerror-code-on-localconnection/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Can Flash Player help your research project?</title>
		<link>http://miti.pricope.com/2009/03/23/can-flash-player-help-your-research-project/</link>
		<comments>http://miti.pricope.com/2009/03/23/can-flash-player-help-your-research-project/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 16:41:01 +0000</pubDate>
		<dc:creator>mpricope</dc:creator>
				<category><![CDATA[Flash Player 10]]></category>
		<category><![CDATA[alchemy]]></category>
		<category><![CDATA[thinking]]></category>

		<guid isPermaLink="false">http://miti.pricope.com/2009/03/23/can-flash-player-help-your-research-project/</guid>
		<description><![CDATA[Last autumn I gave a talk at RoCHI (http://rochi2008.utcluj.ro/) a Romanian academic conference about human computer interaction. I wasn’t very excited to attend the talks there since I didn’t have very high expectation about the research activities in Romania. Well, I was very wrong. About half of the subjects and presentations there left me “mouth [...]]]></description>
			<content:encoded><![CDATA[<p>Last autumn I gave a talk at RoCHI (<a title="http://rochi2008.utcluj.ro/" href="http://rochi2008.utcluj.ro/">http://rochi2008.utcluj.ro/</a>) a Romanian academic conference about human computer interaction. I wasn’t very excited to attend the talks there since I didn’t have very high expectation about the research activities in Romania. Well, I was very wrong. About half of the subjects and presentations there left me “mouth open&#8217;” .I also&#160; had the pleasure to meet Mr. <a href="http://busaco.blogspot.com/">Sabin Buraga</a> who I can say is a true Teacher 2.0 <img src='http://miti.pricope.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  and who was one of the main responsible for putting together that inspiring conference.</p>
<p>But there is one subject in particular that I want to talk about: Augmented Reality. Because at that little conference I had the pleasure of staring at some extremely cool augmented reality demos. They were based, I think, on some versions of <a href="http://www.hitl.washington.edu/artoolkit/">ARToolKit</a>, also a joint research effort from multiple universities. And I was thinking: How can this technology be put to use on some real projects? How can it be evangelized?</p>
<p>Then I forgot about it until a colleague of mine showed me <a href="http://09.aid-dcc.com/">this demo</a>. It was made with a Flash port of ARToolKit called <a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en">FLARToolKit</a> by <a href="http://saqoosha.net/">Saqoosha</a>. How cool was that, augmented reality in Flash!</p>
<p>And then the creative agencies got them and now it seems to be a fad:</p>
<p><a title="http://ge.ecomagination.com/smartgrid/#/augmented_reality" href="http://ge.ecomagination.com/smartgrid/#/augmented_reality">http://ge.ecomagination.com/smartgrid/#/augmented_reality</a></p>
<p><a title="http://www.topps.com/" href="http://www.topps.com/">http://www.topps.com/</a></p>
<p>and I think that BMW is preparing one for <a href="http://www.youtube.com/watch?v=Pgyl7HVHLdc">Mini</a>.</p>
<p>I realized that once the ARToolKit algorithms got to run in Flash Player and thus reach 98% web audience and some creative agencies figured out they could do something with them, the technology just got free advertising worldwide. I am thinking that if you are working on the next graphical or visualization algorithms you might really want to consider them running on Flash Player. Just for the sake of a cooooool demo that can be seen by everybody. Not to mention that with <a href="http://labs.adobe.com/technologies/alchemy/">Alchemy</a> you can still have all or part of your algorithms written in C or C++ and compile them to run on Flash Player.</p>
]]></content:encoded>
			<wfw:commentRss>http://miti.pricope.com/2009/03/23/can-flash-player-help-your-research-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with Pixel Bender</title>
		<link>http://miti.pricope.com/2008/11/10/playing-with-pixel-bender/</link>
		<comments>http://miti.pricope.com/2008/11/10/playing-with-pixel-bender/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 14:20:10 +0000</pubDate>
		<dc:creator>mpricope</dc:creator>
				<category><![CDATA[Flash Player 10]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://miti.pricope.com/2008/11/10/playing-with-pixel-bender/</guid>
		<description><![CDATA[As you probably know by now, Flash Player 10 has a new feature for image processing that allows you to perform some really cool effects and blends. Well actually this new feature is a little language for parallel computing. In this post I present some samples that show you how to integrate Pixel Bender with [...]]]></description>
			<content:encoded><![CDATA[<p>As you probably know by now, Flash Player 10 has a new feature for image processing that allows you to perform some really cool effects and blends. Well actually this new feature is a little language for parallel computing. In this post I present some samples that show you how to integrate Pixel Bender with your Flex project from start to finish.</p>
<p>First of all you need the Pixel Bender Toolkit. You can get it from <a href="http://labs.adobe.com/wiki/index.php/Pixel_Bender_Toolkit">here</a>. Second you will need to compile your Flex Project against Flash Player 10. There&#8217;s some documentation <a href="http://opensource.adobe.com/wiki/display/flexsdk/Targeting+Flash+Player+10+Beta">here</a>. The whole idea behind my samples is that it took a while for me to put all things together and apply the effects on my Flex elements, and I want to make it easier for you.</p>
<p>In the first project I just made a simple Pixel Bender filter, which replaces the red channel with the blue one, and added it to an image.</p>
<p>Click <a href="http://miti.pricope.com/samples/PBender/first.html" target="_blank">here</a> to see the demo</p>
<p>On the second project I used a filter with some parameters. It doesn&#8217;t do much, just clips a circle from the original image.</p>
<p>Click <a href="http://miti.pricope.com/samples/PBender/second.html" target="_blank">here</a> to see the demo</p>
<p>The next one is a slightly more complex filter that has two input images. I use it to apply an image over a video. </p>
<p>Click <a href="http://miti.pricope.com/samples/PBender/FP10.html" target="_blank">here</a> to see the demo</p>
<p>Finally, because Pixel Bender is basically a number cruncher, I use it to mix two ByteArrays. By chance <img src='http://miti.pricope.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  these two ByteArrays are extracted from two sounds so this is also an example on how you can use Pixel Bender to mix two sounds.</p>
<p>Click <a href="http://miti.pricope.com/samples/PBender/sampleSound.html" target="_blank">here</a> to see the demo (it might take a while before it starts playing because I have to load the sounds first)</p>
<p><strong>UPDATE:</strong> The sound sample demo has two mixing methods. One is using PixelBender (onSampleData) and the other is using a pure AS3 code to mix. You can switch between the two (by changing the event handler at line 32) and and monitor the CPU to see if any performance improvements are detectable (on my computer is around 30%). I updated the demo to use the PixelBender method by default (thanks Chuck!)</p>
<p>You may want to take a look at the <a href="http://miti.pricope.com/samples/PBender/srcview/index.html" target="_blank">source code</a> or <a href="http://miti.pricope.com/samples/PBender/srcview/FP10.zip">download</a> it.</p>
]]></content:encoded>
			<wfw:commentRss>http://miti.pricope.com/2008/11/10/playing-with-pixel-bender/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
