Ever wanted to move your movie clip in a way that it would look like it is moving really fast? In this tutorial I will show you how to add a simple blur filter to enhance movement effect. First add some movie clip to the stage. I simply made a circle, converted it to movie clip and named it circle.

Now to coding part.
First import all needed libraries:

import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;

Now we need to define a tween to which we can add an event listener. Add following line:

var OurTween:Tween;

Now it is time to add our blurry movement function:

function blurEffect(e:MouseEvent):void{OurTween = new Tween(circle, "x", Strong.easeInOut, circle.x, circle.x + 400, 0.75, true);
OurTween.addEventListener(TweenEvent.MOTION_CHANGE, blurOn);
OurTween.addEventListener(TweenEvent.MOTION_FINISH, blurOff);

function blurOn(event:TweenEvent):void{
var blur:BlurFilter = new BlurFilter();
blur.blurX = 15;
blur.blurY = 0;
blur.quality = BitmapFilterQuality.HIGH;
circle.filters = [blur];
}
function blurOff(event:TweenEvent):void{
circle.filters = [];
}
}

We assign movement along X axis to our tween variable. Now we add two event listeners. First will start blur effect on motion change and second will stop blur effect after movement is finished. BlurOn defines a blur filter which will apply a blur filter along x axis (because movement is along x axis). If you would like to move movie clip along y axis, you would apply blur to y. BlurOff function simply remove all filters from movie clip. In a preview shown below I also used a simple movie clip that acts as a button:


ourButton.buttonMode = true;
ourButton.useHandCursor = true;
ourButton.mouseChildren = false;
ourButton.addEventListener(MouseEvent.CLICK, blurEffect);

Note that you also have to put this button on stage (just make a simple rectangle, convert it to movie clip and name it ourButton). And we are done. Thank your for reading this tutorial.