# Tweener Pixel Bender

**URL:** <https://forum.kirupa.com/t/tweener-pixel-bender/279967>\
**Category:** flash\
**Created:** [January 21, 2009, 3:15am UTC](https://forum.kirupa.com/t/tweener-pixel-bender/279967 "2009-01-21T03:15:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyg3r](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tyg3r/32/1341_2.png) [@Tyg3r](https://forum.kirupa.com/u/Tyg3r)\
**Post date:** [January 21, 2009, 3:15am UTC](https://forum.kirupa.com/t/tweener-pixel-bender/279967/1 "2009-01-21T03:15:16Z")

</div>

Hi

I’m desperately trying to use the [Tweener](http://code.google.com/p/tweener/) classes to allow me to animate a Pixel Bender filter.

I know I need to use a specific class called: [registerSpecialProperty()](http://hosted.zeh.com.br/tweener/docs/en-us/methods/Tweener_registerSpecialProperty.html), 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](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](http://scriptplayground.com/tutorials/as/Flash-CS4-and-Pixel-Bender-Overview/) I’m using at the moment:

```auto
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](http://gfxcomplex.com/pixel-bender/mosiac-filter-with-pixel-bender/)_[/SIZE][/COLOR]

Thanks for your time,

**Mark**

[SIZE=“1”][COLOR=“DarkRed”]Apologies if this thread is in the wrong place![/COLOR][/SIZE]
