<?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: Embedding Pixel Bender Filters within a SWF</title>
	<atom:link href="http://www.mikechambers.com/blog/2008/09/08/embedding-pixel-bender-filters-within-a-swf/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikechambers.com/blog/2008/09/08/embedding-pixel-bender-filters-within-a-swf/</link>
	<description>code = joy</description>
	<lastBuildDate>Thu, 11 Mar 2010 21:22:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bob Brodie</title>
		<link>http://www.mikechambers.com/blog/2008/09/08/embedding-pixel-bender-filters-within-a-swf/comment-page-1/#comment-15943</link>
		<dc:creator>Bob Brodie</dc:creator>
		<pubDate>Tue, 10 Mar 2009 03:54:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1454#comment-15943</guid>
		<description>Great information.  Some details for people who are new to Flash 10 and/or are developing without Flex Builder.  1) to embed the pixel bender file, you have to have flex sdk installed (which is probably the best choice).  It will tell you this when you try to compile and it can be downloaded from Adobe labs.  2) At first, the compiler couldn&#039;t find the Shader and ShaderFilter classes.  I realized that my Publish settings needed to be changed to Flash 10 (it was on 9).</description>
		<content:encoded><![CDATA[<p>Great information.  Some details for people who are new to Flash 10 and/or are developing without Flex Builder.  1) to embed the pixel bender file, you have to have flex sdk installed (which is probably the best choice).  It will tell you this when you try to compile and it can be downloaded from Adobe labs.  2) At first, the compiler couldn&#8217;t find the Shader and ShaderFilter classes.  I realized that my Publish settings needed to be changed to Flash 10 (it was on 9).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pixelrevision</title>
		<link>http://www.mikechambers.com/blog/2008/09/08/embedding-pixel-bender-filters-within-a-swf/comment-page-1/#comment-15218</link>
		<dc:creator>pixelrevision</dc:creator>
		<pubDate>Fri, 05 Dec 2008 23:26:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1454#comment-15218</guid>
		<description>Great stuff.  This and the file reference tutorial were really helpful for getting me up and going in a hurry with the 2 things I really was interested in.  I built out a little class to save classes that can wrap .pbj files using both of them: http://blog.pixelrevision.com/actionscript/pixelbender-and-file-creation</description>
		<content:encoded><![CDATA[<p>Great stuff.  This and the file reference tutorial were really helpful for getting me up and going in a hurry with the 2 things I really was interested in.  I built out a little class to save classes that can wrap .pbj files using both of them: <a href="http://blog.pixelrevision.com/actionscript/pixelbender-and-file-creation" rel="nofollow">http://blog.pixelrevision.com/actionscript/pixelbender-and-file-creation</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stan</title>
		<link>http://www.mikechambers.com/blog/2008/09/08/embedding-pixel-bender-filters-within-a-swf/comment-page-1/#comment-14886</link>
		<dc:creator>Stan</dc:creator>
		<pubDate>Sun, 09 Nov 2008 16:23:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1454#comment-14886</guid>
		<description>Nice one Mike!

I was having a problem with loading the filter when I uploaded it to the webserver - it wasn&#039;t loading in even though it was in the same directory as the .swf

I have been through Lee&#039;s excellent demo of Pixel Bender, and yes indeed I find it really slow:

I have animated Lees blur filter demo with the code below, it is set to only update twice per second and yet after running for only a short while it slows down even further... Any ideas why?

Nice work Mike!


P.S This is compiling in Flash CS4 and so not wrapped in a package - which I think is right?


import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.net.*;
import flash.utils.ByteArray;

// SWF Metadata
[SWF(width=&quot;1024&quot;, height=&quot;424&quot;, backgroundColor=&quot;#000000&quot;, framerate=&quot;2&quot;)]

//the file that contains the binary bytes of the PixelBender filter
[Embed(&quot;blur1.pbj&quot;, mimeType=&quot;application/octet-stream&quot;)]
var TestFilter:Class;		

//The image to display the filter on
[Embed(source=&quot;image.jpg&quot;)]
var image:Class;
var im:Bitmap;

var a=0;
var inout=0;

addEventListener(Event.ENTER_FRAME, loop);

function loop(e:Event):void
{
	PB();
}



function PB():void
{
	im = new image() as Bitmap;
	addChild(im);

	//Pass the loaded filter to the Shader as a ByteArray
	var shader:Shader = new Shader(new TestFilter() as ByteArray);
	shader.data.amount.value = [a];
	var filter:ShaderFilter = new ShaderFilter(shader);

	//add the filter to the image
	im.filters = [filter];
	if (inout ==0)
	{
		a = a+1;
		if (a&gt;10)
		{
			inout =1;
		}
	}
	else
	{
		a = a-1;
		if (a&lt;0)
		{
			inout =0;
		}
	}
}</description>
		<content:encoded><![CDATA[<p>Nice one Mike!</p>
<p>I was having a problem with loading the filter when I uploaded it to the webserver &#8211; it wasn&#8217;t loading in even though it was in the same directory as the .swf</p>
<p>I have been through Lee&#8217;s excellent demo of Pixel Bender, and yes indeed I find it really slow:</p>
<p>I have animated Lees blur filter demo with the code below, it is set to only update twice per second and yet after running for only a short while it slows down even further&#8230; Any ideas why?</p>
<p>Nice work Mike!</p>
<p>P.S This is compiling in Flash CS4 and so not wrapped in a package &#8211; which I think is right?</p>
<p>import flash.display.*;<br />
import flash.events.*;<br />
import flash.filters.*;<br />
import flash.net.*;<br />
import flash.utils.ByteArray;</p>
<p>// SWF Metadata<br />
[SWF(width="1024", height="424", backgroundColor="#000000", framerate="2")]</p>
<p>//the file that contains the binary bytes of the PixelBender filter<br />
[Embed("blur1.pbj", mimeType="application/octet-stream")]<br />
var TestFilter:Class;		</p>
<p>//The image to display the filter on<br />
[Embed(source="image.jpg")]<br />
var image:Class;<br />
var im:Bitmap;</p>
<p>var a=0;<br />
var inout=0;</p>
<p>addEventListener(Event.ENTER_FRAME, loop);</p>
<p>function loop(e:Event):void<br />
{<br />
	PB();<br />
}</p>
<p>function PB():void<br />
{<br />
	im = new image() as Bitmap;<br />
	addChild(im);</p>
<p>	//Pass the loaded filter to the Shader as a ByteArray<br />
	var shader:Shader = new Shader(new TestFilter() as ByteArray);<br />
	shader.data.amount.value = [a];<br />
	var filter:ShaderFilter = new ShaderFilter(shader);</p>
<p>	//add the filter to the image<br />
	im.filters = [filter];<br />
	if (inout ==0)<br />
	{<br />
		a = a+1;<br />
		if (a&gt;10)<br />
		{<br />
			inout =1;<br />
		}<br />
	}<br />
	else<br />
	{<br />
		a = a-1;<br />
		if (a&lt;0)<br />
		{<br />
			inout =0;<br />
		}<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Creating Re-distributable ActionScript Libraries of Pixel Bender Filters at Mike Chambers</title>
		<link>http://www.mikechambers.com/blog/2008/09/08/embedding-pixel-bender-filters-within-a-swf/comment-page-1/#comment-13967</link>
		<dc:creator>Creating Re-distributable ActionScript Libraries of Pixel Bender Filters at Mike Chambers</dc:creator>
		<pubDate>Wed, 17 Sep 2008 19:43:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1454#comment-13967</guid>
		<description>[...] work with Pixel Bender filters in Flash, Flex and ActionScript. In particular, I wrote about how to embed pixel bender filters within a SWF and how to encapsulate custom Pixel Bender filters in an ActionScript 3 class. For this post, I am [...]</description>
		<content:encoded><![CDATA[<p>[...] work with Pixel Bender filters in Flash, Flex and ActionScript. In particular, I wrote about how to embed pixel bender filters within a SWF and how to encapsulate custom Pixel Bender filters in an ActionScript 3 class. For this post, I am [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: localToGlobal &#187; Blog Archive &#187; news review -&#62; 37th week of 2008</title>
		<link>http://www.mikechambers.com/blog/2008/09/08/embedding-pixel-bender-filters-within-a-swf/comment-page-1/#comment-13838</link>
		<dc:creator>localToGlobal &#187; Blog Archive &#187; news review -&#62; 37th week of 2008</dc:creator>
		<pubDate>Fri, 12 Sep 2008 09:24:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1454#comment-13838</guid>
		<description>[...] Embedding Pixel Bender Filters within a SWF  [...]</description>
		<content:encoded><![CDATA[<p>[...] Embedding Pixel Bender Filters within a SWF  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flex Monkey Patches &#187; Blog Archive &#187; Rubbernecker’s Review - Week 11</title>
		<link>http://www.mikechambers.com/blog/2008/09/08/embedding-pixel-bender-filters-within-a-swf/comment-page-1/#comment-13793</link>
		<dc:creator>Flex Monkey Patches &#187; Blog Archive &#187; Rubbernecker’s Review - Week 11</dc:creator>
		<pubDate>Tue, 09 Sep 2008 17:30:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1454#comment-13793</guid>
		<description>[...] Embedding Pixel Bender Filters within a SWF (from Mike Chambers) [...]</description>
		<content:encoded><![CDATA[<p>[...] Embedding Pixel Bender Filters within a SWF (from Mike Chambers) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradeek</title>
		<link>http://www.mikechambers.com/blog/2008/09/08/embedding-pixel-bender-filters-within-a-swf/comment-page-1/#comment-13788</link>
		<dc:creator>Pradeek</dc:creator>
		<pubDate>Tue, 09 Sep 2008 11:39:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1454#comment-13788</guid>
		<description>Hi, I made a post on how to access the parameters in a Pixel Blender Filter in Flex, a couple of weeks ago.You can see it here.

http://pradeekonflex.wordpress.com/2008/08/14/dynamically-changing-pixel-blender-data-at-runtime/</description>
		<content:encoded><![CDATA[<p>Hi, I made a post on how to access the parameters in a Pixel Blender Filter in Flex, a couple of weeks ago.You can see it here.</p>
<p><a href="http://pradeekonflex.wordpress.com/2008/08/14/dynamically-changing-pixel-blender-data-at-runtime/" rel="nofollow">http://pradeekonflex.wordpress.com/2008/08/14/dynamically-changing-pixel-blender-data-at-runtime/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mikechambers</title>
		<link>http://www.mikechambers.com/blog/2008/09/08/embedding-pixel-bender-filters-within-a-swf/comment-page-1/#comment-13772</link>
		<dc:creator>mikechambers</dc:creator>
		<pubDate>Mon, 08 Sep 2008 22:50:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1454#comment-13772</guid>
		<description>@noel

Yeah, we will be doing more work on this in the tools and Flex 4, so stay tuned.

mike chambers

mesh@adobe.com</description>
		<content:encoded><![CDATA[<p>@noel</p>
<p>Yeah, we will be doing more work on this in the tools and Flex 4, so stay tuned.</p>
<p>mike chambers</p>
<p><a href="mailto:mesh@adobe.com">mesh@adobe.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noel</title>
		<link>http://www.mikechambers.com/blog/2008/09/08/embedding-pixel-bender-filters-within-a-swf/comment-page-1/#comment-13771</link>
		<dc:creator>Noel</dc:creator>
		<pubDate>Mon, 08 Sep 2008 22:18:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1454#comment-13771</guid>
		<description>This is a great idea. It does make you wonder if Adobe could have simplified the work-flow a little here.

While it could be useful to have these reusable &quot;pbj&quot; nuggets, in some ways it would have been a lot simpler to bundle that whole process into the compiler (in a similar way to mxml getting converted into AS3 at compile time).</description>
		<content:encoded><![CDATA[<p>This is a great idea. It does make you wonder if Adobe could have simplified the work-flow a little here.</p>
<p>While it could be useful to have these reusable &#8220;pbj&#8221; nuggets, in some ways it would have been a lot simpler to bundle that whole process into the compiler (in a similar way to mxml getting converted into AS3 at compile time).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Encapsulating Custom Pixel Bender Filters in ActionScript 3 at Mike Chambers</title>
		<link>http://www.mikechambers.com/blog/2008/09/08/embedding-pixel-bender-filters-within-a-swf/comment-page-1/#comment-13769</link>
		<dc:creator>Encapsulating Custom Pixel Bender Filters in ActionScript 3 at Mike Chambers</dc:creator>
		<pubDate>Mon, 08 Sep 2008 21:30:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1454#comment-13769</guid>
		<description>[...] I posted some code showing how to embed a custom Pixel Bender filter within a SWF and then apply the filter to an image. That works well, but the code is not that reusable since the [...]</description>
		<content:encoded><![CDATA[<p>[...] I posted some code showing how to embed a custom Pixel Bender filter within a SWF and then apply the filter to an image. That works well, but the code is not that reusable since the [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
