topical media & game development

talk show tell print [swf] [flash] flex

  <mx:Application xmlns:mx="" layout="absolute"
                          import flash.filters.*;
                          import flash.utils.ByteArray;                
                          //the file that contains the binary bytes of the PixelBender filter
                          [Embed("shaders/sepia.pbj", mimeType="application/octet-stream")]
                          private var TestFilter:Class;                
                          private function onApplicationComplete():void
                                  //Pass the loaded filter to the Shader as a ByteArray
                                  var shader:Shader = new Shader(new TestFilter() as ByteArray);
                         = [50.0];
                                  var filter:ShaderFilter = new ShaderFilter(shader);
                                  //add the filter to the image
                                  im.filters = [filter];
          <mx:Image right="288" left="40" top="26" bottom="108" id="im" source="@Embed(source='soutine.jpg')"/>

(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.