2 Replies Latest reply on Nov 11, 2008 10:30 AM by CJ Cat

    Wrapping a PBJ into an AS class

    CJ Cat
      After doing some research,
      I've found a way (probably not optimal) to wrap a PBJ into an AS class.
      That is, it's possible to create your own AS filter classes which work just like the built-in BlurFilter and DropShadowFilter.
      You can create an AS filter class with adjustable parameters like BlurFilter.blurX and DropShadowFilter.quality.

      I've started a GoogleCode project called PBJ2AS which does just that.
      If you're interested, just check it out here: http://code.google.com/p/pbj2as/

      The basic idea is converting a ByteArray into a String, then store it in an AS class as a static String property.
      Later on, it can be parsed to regenerate the original ByteArray.
      This ByteArray can then be passed to a Shader to create a ShaderFilter.