private String generateBlendModeImport(BlendMode blendMode){
  if (blendMode == BlendMode.COLOR)   return "import mx.graphics.shaderClasses.ColorShader;\n\n";
 else   if (blendMode == BlendMode.COLORBURN)   return "import mx.graphics.shaderClasses.ColorBurnShader;\n\n";
 else   if (blendMode == BlendMode.COLORDODGE)   return "import mx.graphics.shaderClasses.ColorDodgeShader;\n\n";
 else   if (blendMode == BlendMode.EXCLUSION)   return "import mx.graphics.shaderClasses.ExclusionShader;\n\n";
 else   if (blendMode == BlendMode.HUE)   return "import mx.graphics.shaderClasses.HueShader;\n\n";
 else   if (blendMode == BlendMode.LUMINOSITY)   return "import mx.graphics.shaderClasses.LuminosityShader;\n\n";
 else   if (blendMode == BlendMode.SATURATION)   return "import mx.graphics.shaderClasses.SaturationShader;\n\n";
 else   if (blendMode == BlendMode.SOFTLIGHT)   return "import mx.graphics.shaderClasses.SoftLightShader;\n\n";
 else   return null;
}

private String generateBlendModeImport ( BlendMode blendMode ) { if ( blendMode == BlendMode . COLOR ) return "import mx.graphics.shaderClasses.ColorShader;\n\n" ; else if ( blendMode == BlendMode . COLORBURN ) return "import mx.graphics.shaderClasses.ColorBurnShader;\n\n" ; else if ( blendMode == BlendMode . COLORDODGE ) return "import mx.graphics.shaderClasses.ColorDodgeShader;\n\n" ; else if ( blendMode == BlendMode . EXCLUSION ) return "import mx.graphics.shaderClasses.ExclusionShader;\n\n" ; else if ( blendMode == BlendMode . HUE ) return "import mx.graphics.shaderClasses.HueShader;\n\n" ; else if ( blendMode == BlendMode . LUMINOSITY ) return "import mx.graphics.shaderClasses.LuminosityShader;\n\n" ; else if ( blendMode == BlendMode . SATURATION ) return "import mx.graphics.shaderClasses.SaturationShader;\n\n" ; else if ( blendMode == BlendMode . SOFTLIGHT ) return "import mx.graphics.shaderClasses.SoftLightShader;\n\n" ; else return null ; }
generates a snippet of actionscript source code that imports the correct class for the corresponding blend mode .
