2 Replies Latest reply on Jul 18, 2008 8:39 PM by David August

    Shader Input Types

    David August
      I have been trying to figure out why from within Flash 10 using the ShaderFilter the shader input[0] can be set to any displayobject but if I try to set an input manually ie for a second input (for something like a crossfade) it will only accept bitmapdata. According the documentation input is typed as Object so it seems I should be able to input any displayobject into any input.

      Example:

      myShader = new Shader(new pbFilter());
      myShader.data.src2.input = sprite2;
      shaderFilter = new ShaderFilter();
      shaderFilter.shader = myShader;

      sprite1.filters = [shaderFiler];

      Error:
      ArgumentError: Error #2004: One of the parameters is invalid.
      at flash.display::ShaderInput/set input()