topical media & game development
lib-flex-animation-code-09-ShaderBlendMode.ax
lib-flex-animation-code-09-ShaderBlendMode.ax
(swf
)
[ flash
]
flex
package {
import flash.display.Bitmap;
import flash.display.Shader;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
public class @ax-lib-flex-animation-code-09-ShaderBlendMode extends Sprite
{
[Embed (source="ChannelBlend.pbj",
mimeType="application/octet-stream")]
private var ShaderClass:Class;
[Embed (source="input1.jpg")]
private var input1:Class;
[Embed (source="input2.jpg")]
private var input2:Class;
public function @ax-lib-flex-animation-code-09-ShaderBlendMode()
{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
var back:Bitmap = new input2();
addChild(back);
var fore:Bitmap = new input1();
addChild(fore);
var shader:Shader = new Shader(new ShaderClass());
shader.data.amt.value = [1.0, 0.9, 0.0];
fore.blendShader = shader;
}
}
}
(C) Æliens
18/6/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.