Hi
I’m desperately trying to use the Tweener classes to allow me to animate a Pixel Bender filter.
I know I need to use a specific class called: registerSpecialProperty(), but I just can’t get the hang of it. It’s all rather new to me.
I’ve even tried using this as a guideline:
http://www.elctech.com/snippets/using-tweener-with-pixel-bender-filters
Unfortunately it doesn’t seem to work with my project. I was trying to avoid any OOP just for this bit too, have you any ideas?
I’d really appreciate any help, I’ve been stuck on this for ages now! :hangover:
This is the source I’m using at the moment:
import caurina.transitions.Tweener;
var loader:URLLoader;
var shader:Shader;
var shaderFilter:ShaderFilter;
var image:MovieClip;
image = new SampleImage();
Tweener.addTween(image, {x:stage.stageWidth/2, y:stage.stageHeight/2, time:1, transition:"sunshine"});
addChild(image);
function startEffect() {
loader = new URLLoader();
loader.dataFormat=URLLoaderDataFormat.BINARY;
loader.addEventListener(Event.COMPLETE, loadComplete);
loader.load(new URLRequest("PixelationFilter.pbj"));
}
function loadComplete(e:Event):void {
shader=new Shader(loader.data);
initFilter();
}
function initFilter() {
shader.data.pixSize.value=[10];
shaderFilter=new ShaderFilter(shader);
image.filters=[shaderFilter];
}
startEffect();
[COLOR=“Gray”][SIZE=“1”]The filter is an adjustment from gfxcomplex.com[/SIZE][/COLOR]
Thanks for your time,
Mark
[SIZE=“1”][COLOR=“DarkRed”]Apologies if this thread is in the wrong place![/COLOR][/SIZE]